Recent Msdn This section describes the usage HTTP Module And Handler Implemented error logging Module Elmah (error logging modules and handlers )), He can record all unprocessed Asp.net ProgramException , You do not need to modify the existingCode , No need to re-compile and deploy , Modify Web. config Set DLL Copy Bin Okay. . Elmah You can not only record the detailed descriptions of the well-known pornographic screens that appear on the client. , It also includes server variables. , Cookie, Form variable ( Reports are not displayed by default. Cookie, Form variable, But you can modify the extension by yourself. ) Other things .
It is also very convenient to query error logs. , Great , Better yet , Actually, it supports publishing RSS In this way, you can use your favorite news reader to query and read regularly. , The following are several images on msdn. :
Figure 1 log list
Figure 2 view detailed error information
Figure 3 RSS logs
Elmah You can easily scale up and support multiple backend storage methods. , It comes with support 2 Method : Sqlerrorlog (SQL Server 2000) And Memoryerrorlog ( Memory ), If you cannot meet your needs, you can add XML, Other storage methods such as databases.
I just mentioned that you only need to modify Web. config Copy one DLL, The Aspx Page is not required , Purely through Httphandler Processed , Clean and neat . The original system will not be damaged to the greatest extent. . If you don't like it, you can delete it at any time. .
Specific technical implementation and usageArticleIt's all very detailed.,And open the code,You can use it without permission.,Learn more by the wayHTTP ModuleAndHandler.
ElmahCodeYou can download it here
Http://workspaces.gotdotnet.com/elmah
MsdnThe introduction Article is here
Http://msdn.microsoft.com/asp.net/default.aspx? Pull =/library/en-US/dnaspp/html/elmah. asp