Chapter 5. Diagnostics and Error Handling


Traditionally, one of the most frustrating aspects of building ASP-based Web applications has been the inconsistent debugging and diagnostic support. The script debuggers for diagnosing server-side VBScript or JavaScript errors are notoriously unreliable, and the most commonly used diagnostic tool used for analyzing ASP applications is Response.Write() . Contrast these tools with the rich debugging and diagnostic facilities that both C++ and Visual Basic developers have had for years , and it is obvious why ASP developers have been frustrated with debugging.

Fortunately, ASP.NET changes all that. To begin with, because ASP.NET pages are now compiled into complete assemblies before execution, they can be debugged with the same debugging facilities available to component and application developers, including the full-featured Visual Studio .NET debugger. Second, the diagnostics for building ASP.NET applications have also improved significantly, including a tracing facility that lets you print diagnostic messages that display only when tracing is enabled, and a number of new performance monitor counters to track everything from worker process lifetime to requests processed per second.

In addition to diagnostic support, ASP.NET provides comprehensive error handling and recovery support. You can provide custom error pages to be displayed when specific error codes are returned, and because all of ASP.NET is built on top of the CLR, the native exception handling mechanism in .NET is used to transmit unexpected errors.



Essential ASP.NET With Examples in C#
Essential ASP.NET With Examples in C#
ISBN: 0201760401
EAN: 2147483647
Year: 2003
Pages: 94
Authors: Fritz Onion

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net