Monday, November 08, 2004

Error handling in ASP.NET

I've been doing some research on error handling in ASP.NET. All I wanted to show error detail in custom page instead of giving user Microsoft's ugly page. The sample code I found was using VB.NET, another ugly thing. In VB, there is some thing called shared class, which can not be implemeted in C# or Delphi. Using this shared class, whole exception can be passed to custom page, but it is no use for me. Then I found a sample code, which is also in VB, but gave me clue how to achieve things I wanted for long. I used HttpContext.Current.Response.Write() method to give output. So, I wrote a library to handle all the errors generated in my application. Written completely using Borland's C# Builder, this library can be used with other ASP.NET application. I am planning to write an article on error handling and post it to along with source code of library.

No comments: