Nannette Thacker ShiningStar.net

ASP.net Web Application Development

Sponsors

News

See all Blog Posts by Nannette.

Nannette Thacker, consultant and owner of Shining Star Services LLC, specializes in development of custom dynamic database driven web applications utilizing ASP.net technologies. Nannette has been developing ASP sites since 1997. Nannette has written numerous articles on web development techniques and tutorials.

Nannette is the owner and developer of ChristianSinglesDating.com.

 Subscribe in a reader




Enabling ASP Classic error messages in IIS7 and Windows Web Server 2008

I recently moved my asp classic code from my windows 2000 web server to my windows 2008 web server. But alas, error messages are turned off by default. I got a whole lot of blank pages with grinding hour glasses.

To turn back on the error messages, I found two invaluable posts on the web:

The first post covered about everything I needed:

ASP Detailed Error Messages. From this post, these are the three things that are required for turning on error messages. Most developers will likely already have the first step done.

"Turn off HTTP Friendly Errors in your web browser.
http://support.microsoft.com/kb/294807

To revert back to IIS6- behavior, simply run the following command:
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

You also have to configure IIS custom-error to allow detailed errors to be sent to remote clients.
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpErrors -errorMode:Detailed (default is DetailedLocalOnly)."

I wanted to see if there was a GUI method of doing the above two commands, and found a screenshot for  scriptErrorSentToBrowser in this second post.

I couldn't find a GUI method of doing the errorMode, and you'll notice that AnilR recommends "Note that you would never want to do the last step on a production server." If anyone knows where this can be setup via the GUI, please let us know.

The second post lists Tips for Classic ASP Developers. Scroll down to the section on "Script errors no longer shown in browser by default." There you'll see screenshots of how to set the "scriptErrorSentToBrowser" setting via the GUI. This second post doesn't mention the "errorMode" but I found that doing the first command without the errorMode command was useless. I had to have the second command before messages were sent to the screen.

You may also wish to look at the next section on preventing errors due to the "Parents paths disabled by default" setting.

I also should mention that you may need to run your commands as Administrator, from this post on "Classic ASP: Security is Painful" we read these steps on running as administrator:

"1) Start an elevated command prompt. Right-click the command shell item in the Start-Accessories menu and select "Run as Administrator".

2) Run the following command: %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true"

May your dreams be in ASP.NET and your classic applications magically converted to .NET while you sleep,

Nannette Thacker

 

Comments

Peter said:

Recently I've seen several command lines like this for IIS7. Why aren't all those settings accessible from the UI?! At least let us configure it with a XML file or something, but please don't make me remember esoteric command line arguments... I thought we left that behind.

# January 12, 2009 11:06 AM

marco said:

Thank you very much!

i was searching for this for hours!

now i only have one problem the old upload DLLs :(

# May 23, 2009 4:51 AM

IIS 7.0 Error Pages and NLB cluster - TechExams.net IT Certification Forums said:

Pingback from  IIS 7.0 Error Pages and NLB cluster - TechExams.net IT Certification Forums

# June 24, 2009 9:09 AM

IIS 7.0 Error Pages and NLB cluster - TechExams.net IT Certification Forums said:

Pingback from  IIS 7.0 Error Pages and NLB cluster - TechExams.net IT Certification Forums

# June 25, 2009 11:42 AM

JP said:

Seems as though there should be a way to do this with a web.config file ??

# September 7, 2009 3:00 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)