14Jan
ASP .Net MVC Error Logging Using Elmah
ASP .Net MVC Error Logging Using Google Elmah
Introduction:
ELMAH is one of the popular Library to logging unhandled errors provided by Google .It’s an application wide error logging facility which can be dynamically plugged. You don’t need to recompile the code. It’s pluggable. Below I will show you how to log your errors using elmah without having to write even one line of code. More over when you deploy it on a server you can remotely view the errors.
In this blog I am explaining how to use Elmah in MVC application.
Step1: Open your MVC application solution.

Step 2: Add the packages for Elmah using NuGet Packages.
Right click on the project ->select Manage NuGet Packages

Step 3: Search for Elmah
Install Elmah Core Libary & Elmah.Contrib.MVC
Click on Close after installation

Step 4: Build solution and Run
And follow URL with your port number as show below and you will get logged errors.

Advantages of using Elmah:
- Serves a purpose of tracking errors and exceptions for your web applications
- Allows you to easily log or view those exceptions via many different mechanisms (sql, rss, twitter, files, email, etc).
- If you have no built in exception handling Elmah will most likely get you what you are looking for in terms of exception handling in a web application environment.
Related
Securing ASP.NET Web API using Custom Token Based AuthenticationProviding a security to the Web API&...
Read More >
When you are working with certain projects which involves the Customer records, you might need to tr...
Read More >
What does it mean?Asynchronous actions allow developers to handle more concurrent requests and can b...
Read More >
ELMAH(Error Logging Modules And Handlers)What is ELMAH?ELMAH (Error Logging Modules and Handlers) is...
Read More >
Visual studio installation comes with the various predefined project templates, and we can use one o...
Read More >
Unit Testing – ExplainedA process which involves writing code to verify a system at a lower an...
Read More >
Introduction on SignalRReal–Time Web ApplicationThe real-time web is a set of technologies tha...
Read More >
IntroductionSharePoint is a browser-based collaboration, content management, and extensible platform...
Read More >
Share