This Wrox Blox will teach you how to unravel the mysteries ofexception handling in ASP.NET. First, you'll get athorough introduction to structured exception handling in the .NETFramework, learn about the Exception class, the related C# languageconstructs, and how exceptions propagate up the call stack. Then,you'll delve into a variety of practical topics such as:when, where, and how to properly throw, catch, and handleexceptions in your code; how to employ "defensiveprogramming" techniques to avoid triggering the most commonCLR exceptions; adopting exception handling "bestpractices," handling exceptions from rich ASP.NET servercontrols, data-bound controls, data sources, and AJAX asynchronouspostbacks; and processing unhandled exceptions at both the page andapplication levels.
The author also walks you through the building of a complete,reusable, and fully configurable ASP.NET exception processingframework that extends far beyond ASP.NET's built-in errorhandling capabilities. You'll learn how to collectinformation about the state of the application when the exceptionoccurred; how to leverage various ASP.NET state-handling mechanismssuch as Application, Context, Session, ASP.NET Cache, cookies, andquery strings to store and pass error data; create a friendly,informative, and highly functional custom error UI; show friendlyerror messages to "normal" visitors, while showingdetailed error reports only to site managers based onauthentication, authorization, or IP; provide a way for users toadd their own information to error reports; persist errors to theWindows Event Log, XML files, or a custom database; send detailederror notifications via e-mail and SMS text; and build anadministrative dashboard to list, sort, page, view, and manageerror logs.
Once complete, you'll learn how to quickly and easily addthis new framework to any web site you create using a simple .NETassembly. A complete sample application and C# source codefor the exception processing framework are available as a companiondownload.
Lee Dumond
Computer Science Informatik Web Site Development Web-Entwicklung