Chapter 28. Handling Errors in an ASP.NET Application

IN THIS CHAPTER

Exceptions and the .NET Framework

Implementing Structured Exception Handling

Throwing Exceptions

Adding a Global Exception Handler

Using the <customErrors> Element

Checkpoint

Exceptions and the .NET Framework

In the previous chapter, we talked about the fact that computer code will always have bugs in it. In a best-case scenario, you can debug your code before your website goes live. Unfortunately, the best-case scenario never happens. Therefore, you’re going to have to plan for errors when visitors use your website.

The .NET Framework uses a method known as structured exception handling to handle errors. Structured exception handling means that code that might generate an ...

Get The Microsoft Expression Web Developer's Guide to ASP.NET 3.5: Learn to create ASP.NET applications using Visual Web Developer 2008 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.