What are the steps required to set up elmah on an ASP.NET MVC 3 application?
Is that all? Is step 3 still necessary after nuget?
ELMAH (Error Logging Modules and Handlers) is a series of HTTP modules and an HTTP handler that may be added to your ASP.NET web applications for the purpose of tracking unhandled exceptions. ELMAH provides access to view these errors by way of a web console, email notifications. It is open-source error logging system.
elmah.io for ASP.NET Core supports a range of actions for hooking into the process of logging messages. Hooks are registered as actions when installing the elmah.io middleware: services.
It is an open source framework. Log4net provides a simple mechanism for logging information to a variety of sources. Information is logged via one or more loggers. These loggers are provided at the below levels of logging: Debug.
This error log is accessible from the web page elmah. axd from the root of your website, such as http://localhost/BookReviews/elmah.axd .
Taken from : HOW TO SETUP ELMAH.MVC WITH ASP.NET MVC 4 ?
What is Elmah ?
ELMAH is an open source project whose purpose is to log and report unhandled exceptions in ASP.NET web applications.
Why to use Elmah ?
ELMAH serves as an unobtrusive interceptor of unhandled ASP.NET exceptions, those usually manifesting with the ASP.NET yellow screen of death.
So now we know what and why to use Elmah, Lets quickly get started on how to use Elmah with your ASP.NET MVC project.
Step 1: Right click on your solution and select the "Manage Nuget Packages" option
Step 2: In the Nuget Package manager search for "Elmah" and install the Elmah.MVC nuget extension.
The Nuget Package manager will download and add the required dlls and modify the web.config's <appSetting>
for Elmah to work.
Step 3: That's it !! Your Elmah is now ready to test. I have generated a 404 to test if my Elmah works, ELMAH can be accessed by this url : http://yourapp.com/elmah.
Hope this helps :)
Further Reading :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With