CSS files are not showing on server - ASP.NET MVC Bundles error. 403 - Forbidden: Access is denied
Your problem is that you are using ~/Content/css
as a bundle alias in new StyleBundle("~/Content/css")
, while this path actually exists.
So when you are requesting <link href="/Content/css?...>
you are essentially asking for a directory listing and that is forbidden.
Try using something else, like new StyleBundle("~/Content/styles")
.
NOTE: If you do use something like ~/Content/styles
as an alias you may have issues with relative urls in your .css
files. It may seem odd, but you may better use something like ~/Content/Css/someAlias