2

I am working on an ASP.NET MVC 4 in C# project which works very well on my local development server. However, when I push it to my production server, a particular page gives a 500 internal server error. However, the error I get is no more helpful than "An error occurred while processing your request".

How can I force ASP.NET to display a more helpful error, even if it is the yellow screen of death?

Thank you for your time.

pnuts
  • 58,317
  • 11
  • 87
  • 139
Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195

1 Answers1

2

Yes, there's a Yellow Screen of Death. You can force it to display the error by going to the Web.Config file and making sure that you have this line:

<system.web>
   <customErrors defaultRedirect="GenericError.htm"
    mode="Off"></customErrors>
</system.web>

BUT be very careful NOT to leave it like this after you figure out the issue. It is BIG a security risk to display full stack traces of errors on a Production box.

tgolisch
  • 6,549
  • 3
  • 24
  • 42
Icarus
  • 63,293
  • 14
  • 100
  • 115