ASP .NET Web Developer's Guide

Chapter 9: Debugging ASP.NET

Introduction

Before ASP 3.0, error handling was never a strong suit of ASP. Despite taking great efforts to handle possible error conditions, it is not uncommon to see ASP applications crash and display cryptic error messages. For applications critical to a company s success, this is a huge embarrassment. You may have seen something like this quite often:

Microsoft VBScript runtime error '800a0006' Overflow /wad/vote.asp, line 25 

Besides handling errors, how many times have you forgotten to remove debugging statements in your application? Often, due to the unrealistic and tight deadlines imposed by management, you end up rushing to deploy your application. In the midst of doing that, a few debugging statements occasionally get left out.

In this chapter, we will look at the new error handling mechanisms available in .NET. We will discuss how to anticipate various kinds of errors and their possible remedies. We will also look at how the new Trace class in ASP.NET allows programmers to trace the flow of ASP.NET applications as well as explore the various capabilities available in the Trace class. Finally, we will show you how to use the Object browser and Class Viewer to look for specific libraries.

Handling Errors

While it is the hope of every programmer to write bug-free programs, it can prove a tasking goal. Bugs in programs can be incredibly frustrating, usually disrupting the programs they infect. Such errors can be classified into these four categories, which we ll discuss in the following sections:

  • Syntax Errors

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Bug Tracking Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.