Skip to Content
Beginning ASP.NET 3.5: In C# and VB
book

Beginning ASP.NET 3.5: In C# and VB

by Imar Spaanjaars
March 2008
Intermediate to advanced content levelIntermediate to advanced
766 pages
21h 15m
English
Wrox
Content preview from Beginning ASP.NET 3.5: In C# and VB

Chapter 17. Exception Handling, Debugging, and Tracing

You can't make an omelet without breaking eggs and you cannot write code without creating bugs. No matter how hard you try and how good you are, your code will contain problems that affect the behavior of your web site.

Of course you should strive to minimize the impact of these bugs, aiming for a "zero bug count." To aid you in this, the ASP.NET run time and Visual Web Developer provide you with a number of tools.

First of all, the languages supported by .NET implement exception handling, a methodology to identify and handle errors that occur at run time. By handling these errors, you can present your users a friendly error message. At the same time you can log these errors, giving you a chance to fix them before they reoccur. In this chapter you see how exception handling works, and how to log your errors by e-mail.

Before your code goes into production you need to write and debug it first. To help you debug your code, VWD comes with a rich toolset that includes ways to step through your code line by line, look at your variables and objects at run time, and even change them as you go. The toolset also provides you with valuable information about the execution path your code follows: the path that your application takes through your code, following methods, event handlers, If and Else statements, and so on.

In particular, this chapter looks at the following topics:

  • How to write code that is able to detect and handle errors ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ASP.NET 4: in C# and VB

Beginning ASP.NET 4: in C# and VB

Imar Spaanjaars
Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Bill Evjen, Scott Hanselman, Devin Rader

Publisher Resources

ISBN: 9780470187593Purchase book