ASP
  Home arrow ASP arrow Replacing the Error 500 ASP Page
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

Replacing the Error 500 ASP Page
By: Wrox Team
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 28
    2003-01-20

    Table of Contents:
  • Replacing the Error 500 ASP Page
  • The ASPError Object
  • Editing the ASP Error Page
  • Extending the Functionality
  • E-Mailing Errors
  • SourceSafe Integration
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Replacing the Error 500 ASP Page


    (Page 1 of 7 )

    This article looks at how error information is stored and obtained in ASP 3.0 - the ASPError object, this information is then used in the creation of a new, better error page.As of ASP v3.0 (IIS 5, Windows 2000), whenever an unhandled error occurs during the processing of an ASP page, control is passed to a page specified in the Custom Errors section of IIS's settings. The default page that is used when such an "Error 500" happens displays similar content to other pages such as the 404 - File Not Found error.

    This is unhelpful for two reasons. Firstly, the page that is displayed is not very distinctive to developers due to this similarity - the relevant information is presented in a generic manner rather than one appropriate to the fact that there is an error, and more in-depth information would be beneficial. Secondly, for end users, the page displays information that they should probably not be privy to - how the page functions, what type of error has occurred, etc.

    Such information could theoretically be used to gain unauthorized access to the system. This type of information should be reserved for internal development and testing purposes.

    The standard 500-100.asp error page
    The standard 500-100.asp error page


    This article looks at ways of solving both of these problems - mainly focusing on improving the feature-set and usability for the developer. The first section covers the ASPError object, which contains all of the information that is made available by ASP regarding the errors that occur.

    Following that, the error pages that are displayed by .NET are described, and compared with the standard error pages. An implementation of this style of page is then given for classic ASP.

    After all of the information that is available to us has been described and demonstrated, the appearance of this page is then simplified to provide more space for further functionality.

    Such features as syntax highlighting of source code are also added. Following this, a method of displaying a more appropriate error page for end-users of the system is described and implemented. Extra functionality is then added - such as allowing the editing of the code on the error-page itself (along with coverage of the pitfalls associated with this), support for other devices calling the ASP page, and the e-mailing of errors to the developer.

    Finally, consideration is given to further features that could be added to the error page.

    With the exception of the following discussion of error trapping mechanisms available in the various languages, all of the information presented below is equally valid for ASP pages running VBScript or JScript.

    Errors that occur during the processing of client-side scripts such as ECMAScript (JavaScript) are not covered by this article.

    More ASP Articles
    More By Wrox Team


     

    ASP ARTICLES

    - Central Scoreboard with Flash and ASP
    - Calorie Counter Using WAP and ASP
    - Creating PGP-Encrypted E-Mails Using ASP
    - Be My Guest in ASP
    - Session Replacement in ASP
    - Securing ASP Data Access Credentials Using t...
    - The Not So Ordinary Address Book
    - Adding and Displaying Data Easily via ASP an...
    - Sending Email From a Form in ASP
    - Adding Member Services in ASP
    - Removing Unconfirmed Members
    - Trapping HTTP 500.100 - Internal Server Error
    - So Many Rows, So Little Time! - Case Study
    - XDO: An XML Engine Class for Classic ASP
    - Credit Card Fraud Prevention Using ASP and C...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway