ASP .Net MVC Error Logging Using Elmah - Blogs
X
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.

image1

 

Step 2: Add the packages for Elmah using NuGet Packages.

              Right click on the project ->select Manage NuGet Packages

 

 

image2

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

image3

 

Step 4: Build solution and Run

              And follow URL with your port number as show below and you will get logged errors.

image4

 

Advantages of using Elmah:

  1. Serves a purpose of tracking errors and exceptions for your web applications
  2.  Allows you to easily log or view those exceptions via many different mechanisms (sql, rss, twitter, files, email, etc).
  3.  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

Token Based Authentication for Web API's

Securing ASP.NET Web API using Custom Token Based AuthenticationProviding a security to the Web API&...

Read More >

ASP.NET: Audit Trail Implementation using Entity Framework

When you are working with certain projects which involves the Customer records, you might need to tr...

Read More >

Asynchronous actions in MVC 5

What does it mean?Asynchronous actions allow developers to handle more concurrent requests and can b...

Read More >

ELMAH Integration in ASP.NET MVC Application

ELMAH(Error Logging Modules And Handlers)What is ELMAH?ELMAH (Error Logging Modules and Handlers) is...

Read More >

Dependency Injection on SignalR

                &nbs...

Read More >

Create custom project templates in Visual Studio

Visual studio installation comes with the various predefined project templates, and we can use one o...

Read More >

Unit testing in .NET

Unit Testing – ExplainedA process which involves writing code to verify a system at a lower an...

Read More >

Part 2 of KnockOut.js in Asp.Net

Computed Observables:             &...

Read More >

Introduction on SignalR

Introduction on SignalRReal–Time Web ApplicationThe real-time web is a set of technologies tha...

Read More >

How to upload documents to SharePoint 2013

IntroductionSharePoint is a browser-based collaboration, content management, and extensible platform...

Read More >

Share

Try DevOpSmartBoard Ultimate complete Azure DevOps End-to end reporting tool

Sign Up

  • Recent
  • Popular
  • Tag
Monthly Archive
Subscribe
Name

Text/HTML
Contact Us
  • *
  • *