Chapter 17Exception Handling, Debugging, and Tracing

What you will learn in this chapter:

  • The different types of exceptions
  • How to handle exceptions
  • Debugging your application
  • How to use the Page Inspector
  • Using standard tracing in ASP.NET
  • Logging

Code Downloads for this Chapter:

The wrox.com code downloads for this chapter are found at www.wiley.com/go/beginningaspnetforvisualstudio on the Download Code tab. The code is in the chapter 17 download and individually named according to the names throughout the chapter.

Unfortunately, the more time you spend as a developer, the greater the variety of errors you will encounter, as errors are a common part of the development process. However, as your application evolves, the burden is on you to find these errors and resolve them, because they demonstrate some kind of problem in either your software or the data with which you are working.

You have already had some exposure to exceptions throughout the book, but your software can experience other types of problems that don't throw exceptions. Because of this lack of exceptions, these problems can be difficult to track down; instead, you have to follow through the code and examine what is happening with the data, rather than analyze an exception to get this information. This process can be very complicated, especially in larger applications, because a request could travel through many different classes and objects between the request being received and the response being returned. ...

Get Beginning ASP.NET for Visual Studio 2015 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.