While troubleshooting my website, I noticed that the CSS is not displaying. I am encountering an Error 500 on the Site.css file when inspecting it in Firefox.
My _Layout.cshtml is configured to utilize the CSS files.
@Styles.Render("~/Content/css")
I have confirmed that the Site.css file is in the correct directory and I can open it using Notepad.
I have reviewed the BundleConfig.cs and identified where it is bundled with other files.
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));
}
What's particularly strange is that this setup works on IIS7.5, however, the background image does not load, resulting in error 500. The IIS_Users group has the necessary permissions to access these files.
Another issue is that images are not displaying on the site. In the CSS, the background is defined as
background: url("../Images/heroAccent.png") no-repeat;
The Images directory is located in the same directory as Views/Models/Controllers.