I have an ASP.NET MVC application (on .NET 4.8). Currently, the DevOps team has set up Nginx to handle requests with: location: / and this works fine.
Now they want to change the setup so the application should work under: location: /report and they have done their work and waiting for my changes.
What changes do I need to make in the ASP.NET MVC project (or configuration) so that it works correctly when served from /report instead of the root (/)?
Do I need to update RouteConfig, WebApiConfig, web.config or something else?
It seems in .NET Core, we just have to set app.UsePathBase("/report"); or in Angular one of the ways is build with --base-href="/report"
reportto the app root, no changes inRouteConfigorWeb.configare needed, just ensure links, scripts, and CSS use ~ orUrl.Actionso URLs resolve correctly. But If it doesn't rewrite, prefix your routes inRouteConfigwithreport/and make sure all URLs and assets include the/reportpath (or useUrl.Content("~/")/Url.Action(...)). Optionally you can also setset <base href="~/..."> in _Layout.cshtml.