Showing posts with label mvc. Show all posts
Showing posts with label mvc. Show all posts

Wednesday, February 2, 2011

Displaying Custom Error Messages / Enabling Detailed Errors on IIS 7

 

I was deploying an ASP.NET MVC 2 default application to one of my GoDaddy hosted sites when I encountered the below screen:

20110203-1524-Runtime Error

How can I know the underlying problem?

Simply edit the web.config file.

(1) Inside <system.webServer> node add

<httpErrors errorMode=”Detailed” />

<asp scriptErrorSentToBrowser=”true” />

(2) Inside <system.web> node add

<customErrors mode=”Off” />

<compilation debug=”true” />

 

Wasn’t that so easy?!

 

NOTE: Remove the said lines after you have found and applied the fix to your problem. You don’t want your regular website visitor know the internals of your application, right? Smile

Monday, January 31, 2011

ASP.NET MVC 3.0

 

Time flew so quick and I guess I was left out in the know. So to catch up I’ll get to review http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs and download the installer here: http://go.microsoft.com/fwlink/?LinkID=208140