0

When testing my ASP.NET MVC 3 app in Internet Explorer 9, I get the generic "Internet Explorer cannot display the webpage" error instead of the Yellow Screen. The errors get thrown to the Event Viewer though. How can I get my Yellow Screen back so I can see my errors in the browser when they happen?

Brian David Berman
  • 7,514
  • 26
  • 77
  • 144

2 Answers2

0

First, do you have the option checked in IE to not display error messages? Second, are you capturing the errors in your web.config? Third, do you have IIS set to return error messages to the client?

Josh
  • 10,352
  • 12
  • 58
  • 109
  • The web application is a hybrid MVC/Web Forms project. I get YSOD when I get Web Forms errors but not MVC errors. – Brian David Berman Aug 24 '12 at 16:22
  • Check out http://stackoverflow.com/questions/6508415/application-error-not-firing-when-customerrors-on for errors not working with MVC. – Josh Aug 24 '12 at 16:31
0

Reading your comment to Josh Im wondering its its WebForms + MVC rather than an MVC + WebForms project if that is so I Found some info here http://forums.asp.net/t/1510043.aspx/3/10 that might resolve this issue. I've summarised the useful bits below for convenience.

Try adding this into the handlers section of web.config:

<add name="ASP.NET MVC" path="*.mvc" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.21006\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" />

Followed by this in your global.asax file:

routes.MapRoute(
            "Default",                                              // Route name
            "{controller}.mvc/{action}/{id}",                          // URL with parameters
            new { controller = "Home", action = "Index", id = "" }
Luke Baughan
  • 4,658
  • 3
  • 31
  • 54