ELMAH enables logging of all unhandled exceptions. ELMAH logs all errors in many storages, like - SQL Server, MySQL, Randon Access Memory (RAM), SQL Lite, and Oracle.
Here we will see how we can integrate elmah into our asp.net site and we are using MySql storage to log error.
ADDING PACKAGE
Here we need to add NuGet package "elmah"
RUN SCRIPT
Run script on your MySql database, get Script from here
MODIFY WEB.CONFIG
Go to web.config and modify elmah configuration to
<elmah> <errorLog type="Elmah.MySqlErrorLog, Elmah" connectionStringName="YourConnectionStringName"/> <security allowRemoteAccess="true" /> </elmah>