ASP.NET MVC 3 site on IIS 8 not rendering CSS and Javascript

by sunil ravulapalli /23. October 2013 06:42 / /Comments (0)

Recently, I had this problem where my MVC 3 site on IIS 8 was not rendering correctly. In fact amazingly when I checked fiddler those requests were throwing HTTP 500 errors. After, unsuccessfully searching online for a solution, I resorted to trial and error editing of the web.config file.

Previously, to add MIME types to IIS, I had this section in the web.config.

  <mimeMap fileExtension=".mp4" mimeType="video/mp4" /> 
  <mimeMap fileExtension=".ogv" mimeType="video/ogg" />

However, this doesn't seem to be sitting well with IIS 8. Once, I removed that section all else worked fine.

An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module.

by sunil ravulapalli /14. June 2011 21:37 / /Comments (1)

I go this error recently:

"An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module."

I narrowed it down to the Html.Action( Html.RenderAction ) call in _Layout.cshtml.

The Html.Action in _Layout.cshtml looked like this:

@{ Html.Action("List", "Categories"); }

My controller method looked like this:

public ActionResult List()
            List categories = categoriesRepository.Categories.ToList();
            List navLinks = new List();

            foreach (Category cat in categories)

            return View(navLinks);

Turns out the proper way to design this is to do the following: