ELMAH (Error Logging Modules and Handlers) is a pluggable component that you can use to log errors without modifying the application code. The main advantage of ELMAH is it's pluggable feature. You can easily integrate the ELMAH component in your developed application. It's an open source project and you can customize the code according to your needs. I am not going to show you how to customize the component; instead configuration of this component with your ASP.Net application and how you can store the error messages in SQL Server. You can also store the error information in Oracle, Access or XML. There are several options available in their website.
First task is to download the ELMAH project from following link
http://code.google.com/p/elmah/
Once download is complete, create one website and add the elmah.dll reference from bin folder under the downloaded folder. All versions dll are available starting from .Net fx 1.1 to .Net fx 3.5.
Next, make the appropriate ELMAH entries in Web.config. In ConfigSections, add the following:
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/>
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/>
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/>
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/>
</sectionGroup>
Read more: C# Corner
First task is to download the ELMAH project from following link
http://code.google.com/p/elmah/
Once download is complete, create one website and add the elmah.dll reference from bin folder under the downloaded folder. All versions dll are available starting from .Net fx 1.1 to .Net fx 3.5.
Next, make the appropriate ELMAH entries in Web.config. In ConfigSections, add the following:
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/>
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/>
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/>
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/>
</sectionGroup>
Read more: C# Corner