ASP 101 - Active Server Pages 101 - Web03
The Place ASP Developers Go!



Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash



 Top ASP 101 Stories Top ASP 101 Stories
Migrating to ASP.NET
Getting Scripts to Run on a Schedule
The Top 10 ASP Links @ Microsoft.com

QUICK TIP:
Don't use the Default Web Site
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates


ASP Error Messages

by Stuart Dickerson

These days it is not uncommon to have a server run multiple websites. One reason to do this is to have another site using a friendly name attached to your domain:

www.mycompany.com (the default site)
support.mycompany.com (the additional site)

Using the Internet Services Manager on Window NT or 2000, you can create a new site and associate it with an exisiting IP address or additional TCP port. All users requesting the new sites URL will be directed to the specified homepage for that site.

If you develop an ASP application for the new site, you will notice that nothing has changed, with one exception. Instead of getting a detailed error message telling you that your script failed at a particular line and column, you only receive the following:

Error 500: Internal Server Error

You probably realized that this is not a lot of help. And it is hard enough debugging our ASP scripts until .NET comes along. Well don't worry because I have a remedy.

When the new site is created, all of the errors that it produces are associated with either an HTML file or a preset message. It just so happens that when you default website is created, and additional application is installed. This application is called IISHelp. In IISHelp there is an ASP script, 500-100.asp, that provides the error messages that we are used to. When it is installed, it reconfigures the default website to call this ASP script instead of saying "Internal Server Error".

So all we have to do is make sure that our new site can reference this script as a URL. Then configure the website to call the 500-100.asp script. There are numerous ways that we can do this:

  1. Create an IISHelp application on the new website
  2. Copy the 500-100.asp script to the root or some other folder on the new website

I prefer the first method since any changes to the ASP page will be propagated to the new site. Then all that you have to do is set the error to point to this URL when it is fired.


Step 1: Create a new Virtual Directory for IISHelp

Step 2: Configure Custom Errors for the new website

About The Author

Stuart is President of Capricorn Consulting in Atlanta, Georgia. He has been in web development since 1996. Stuart is currently the coordinator of the Atlanta ASP Users Group.

When not coding, Stuart enjoys the great outdoors and reading fiction. He can be reached at dickerson@capconinc.com.

Related Links


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers