How to customize /C1WebMvc/WebResources?r=xxx URL

Posted by: 1728884346 on 16 September 2025, 2:51 am EST

  • Posted 16 September 2025, 2:51 am EST

    we are using below code to load style and script file, but how to customize the host or virtual path?

    because our application is deployed behind a gateway, it has customized host and virtual path to determine the traffic route.

    @Html.C1().Styles()

    @Html.C1().Scripts().Basic()

  • Posted 16 September 2025, 3:11 am EST - Updated 16 September 2025, 3:16 am EST

    here is dll version we use in our application

  • Posted 17 September 2025, 4:40 am EST

    Hello,

    To test your scenario, we created a virtual directory. (see virtualDirectory.png)

    Running the sample did not produce any issues—all network calls returned status 200, and the web resources were available at “./myapp/”. Please see the attached screenshots. (see networkTab.png and sourcesTab.png)

    Sample: https://drive.mescius.io/download?file=ExternalShare/WinForms/Sample_WebResources.zip

    Could you please update the attached sample with your implementation, and share the exact steps along with any additional details needed to reproduce the behavior so we can investigate further?

    Regards,

    Uttkarsh.

    images.zip

  • Posted 17 September 2025, 5:55 am EST

    No, I want to customize the path, not only the virtual path, for example add-in some custpath into the URL.

    host.com/myapp/custpath/resourceUrl

  • Posted 18 September 2025, 4:40 am EST - Updated 18 September 2025, 4:46 am EST

    Hello,

    We’re sorry, but we’re having trouble fully understanding your query.

    To test the scenario, we published the app we attached in previous reply and hosted it on IIS. To simulate a nested path, we created an application under the Default Web Site named “myapp” and then added a child application under “myapp” named “custpath”. Please refer to the screenshot below:

    After this setup, we were able to access the application at http://localhost/myapp/custpath

    without any issues. The resources were loading correctly and located at: myapp/custpath/C1WebMvc/. Please see the attached screenshots for reference.



    Could you please share more details on your scenario and the exact steps we can follow to reproduce the issue locally? If the information is confidential, you may also open a private ticket on our support portal: https://developer.mescius.com/my-account/my-support/newcase

    Regards,

    Uttkarsh.

  • Posted 18 September 2025, 4:53 am EST

    Sorry that I didn’t clearly explain my scenario, in my case, I’m hosting application behind an application gateway, inside the application gateway, we have different rule to control the traffic routing.

    for example,

    host/uat/app1 => app1Host

    host/dev/app2 => app2Host

    so now we want to customize our C1WebResource URL,

    we want to append /uat/app1/ when load C1WebMvc resource request.

    host/uat/app1/C1WebMvc/WebResources?r=xxx

    =>

    app1Host/C1WebMvc/WebResources?r=xxx

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels