ASP.NET MVC framework 4.5 CSS bundle does not work on the hosting

My guess is that the path Content/css exists on disk in your app. In this case IIS would be handling the request, not MVC.

Make sure that the virtual path for the bundle (the parameter of the StyleBundle constructor) doesn’t match a folder in the file system.

From the comments:

“A good convention to follow when creating bundles is to include
“bundle” as a prefix in the bundle name. This will prevent a possible
routing conflict.”

Leave a Comment