Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 15. Extreme ASP.NET 4.0 > Logging and handling errors

15.2. Logging and handling errors

Logging exceptions is important for controlling your applications when they’re deployed. You can opt for your own way of storing this information, using a variation of the code shown in listing 15.1 and intercepting the Error event of HttpApplication, or by using one of the libraries available on the market. Both solutions have their own pros and cons: writing your own code is probably a win/win situation if you don’t want to include references to gigantic libraries in order to use only a small portion of their features; using third-part code lets you implement the task in less time.

No matter which method you choose, handling errors the right way is crucial from a security point of view: the less your attacker can see, the more secure your application is. In this section, you’ll learn how to protect your errors from others’ eyes, and, at the same time, log them for tracing purposes.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial