I have a Asp.Net MVC web application.
I have changed the route URL in the RouteConfig.cs from demo/{controller}/{action/{id} to NewAccount/demo/{controller}/{action/{id}
routes.MapRoute(
name: "Application"
url: "NewAccount/demo/{controller}/{action/{id}",
defaults : new { controller = "MyController", action = "Details", id = UrlParameter.Optional }
);
Here is the folder structure for CSS and Javacript files:
-demo
-images
-CSS
-Scripts
-bundle
- common.js
- commonjs.map
- verticle.js
- verticlejs.map
-Scripts
-contract
-ContactInfo.js
This is the BundleConfig.js
bundles.Add(new ScriptBundle("~/NewAccount/demo/Reinstatement/globaljs").Include(
"~/Scripts/contract/ContactInfo.js"));
In the View:
@Scripts.Render("~/NewAccount/demo/Reinstatement/globaljs")
The new route Url is working fine in the backend (for Controllers), but in the frontend, the css styles and scripts are missing -
Failed to load resource: the server responded with a status of 404 (not found)
-- http://mydomain/404.aspx?aspxerrorpath=/demo/Scrips/bundle/v-20211101/common.js