SlideShare a Scribd company logo
ELMAH
Error Logging Modules And
Handler
Presenter: Harsh Wardhan, Mindfire Solutions
Date: 08/07/2015
Presenter: Harsh Wardhan, Mindfire Solutions
Agenda
- Importance of error logging.
- Introducing ELMAH.
- Installing and configuring ELMAH.
- Best practices.
Presenter: Harsh Wardhan, Mindfire Solutions
Importance of error logging

Helps in tracking bug.

Helps to evaluate application health.

Organised logs save development time.
Presenter: Harsh Wardhan, Mindfire Solutions
Introducing ELMAH

Stands for Error Logging Modules And Handlers.

An open source project created by Atif Aziz.

Completely pluggable.

Logs nearly all unhandled exceptions.

Provides a web page to display all the logged
errors.
Presenter: Harsh Wardhan, Mindfire Solutions
Introducing ELMAH

Provides e-mail, twitter notification for all the
errors as they occur.

RSS feed of last 15 errors logged.

Provides different log storing options including in-
memory, SQL Server, SQLite.
Presenter: Harsh Wardhan, Mindfire Solutions
Installing ELMAH

Adding ELMAH assembly.
Just drop the dll on your application's bin folder.
OR
Install ELMAH NuGet package.
Presenter: Harsh Wardhan, Mindfire Solutions
Configuring ELMAH

Adding a section group which has information on
how to log exceptions.

Adding a http module to log exception.

Adding a http handler to view exception.

Elmah section to set the logger type and other
settings.
Presenter: Harsh Wardhan, Mindfire Solutions
Configuring ELMAH

Adding a section group which has information on
how to log exceptions.
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false"
type="Elmah.SecuritySectionHandler, Elmah"/>
<section name="errorLog" requirePermission="false"
type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false"
type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false"
type="Elmah.ErrorFilterSectionHandler, Elmah"/>
</sectionGroup>
</configSections>
Presenter: Harsh Wardhan, Mindfire Solutions
Configuring ELMAH
Adding a http module to log exception.
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah"
preCondition="managedHandler" />
</modules>
<handlers>
<add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD"
type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
Presenter: Harsh Wardhan, Mindfire Solutions
Configuring ELMAH

Adding a http handler to view exception.
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory,
Elmah" />
</httpHandlers>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
</httpModules>
</system.web>
Presenter: Harsh Wardhan, Mindfire Solutions
Configuring ELMAH

Elmah section to set the logger type and other
settings.
<elmah>
<errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="ELMAHConnectionString" />
</elmah>
Presenter: Harsh Wardhan, Mindfire Solutions
Logging handled exceptions

Raise an exception using ErrorSignal class of
elmah.
ErrorSignal.FromCurrentContext().Raise(new Exception("I
did it..."));
Presenter: Harsh Wardhan, Mindfire Solutions
Best Practices

Secure your logs by restricting remote access.
<elmah>
<security allowRemoteAccess="False" />
</elmah>

Set roles to access the log.
Presenter: Harsh Wardhan, Mindfire Solutions
Question and
Answer
Presenter: Harsh Wardhan, Mindfire Solutions
Thank you

More Related Content

PDF
Troubleshooting oracle apps
PPT
[Solved]Tips to remove advance elite ads
PDF
Web Developer Tools
PDF
Clustering Multiple Instances in Cold Fusion
PPT
High Availability of Azure Applications
PPT
Swift-Programming Part 1
PDF
TDC 2015 - POA - Trilha PHP - Shit Happens
PDF
Session10-PHP Misconfiguration
Troubleshooting oracle apps
[Solved]Tips to remove advance elite ads
Web Developer Tools
Clustering Multiple Instances in Cold Fusion
High Availability of Azure Applications
Swift-Programming Part 1
TDC 2015 - POA - Trilha PHP - Shit Happens
Session10-PHP Misconfiguration

Similar to ELMAH (20)

PPT
Php security
PPT
PHP - Introduction to PHP Error Handling
PDF
Error Handling In PHP with all Try catch anf various runtime errors
PPT
Php Ppt
PPT
Download It
PPT
Error management
PPT
Error reporting in php
PDF
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
PPT
PDF
MidwestPHP 2016 - Adventures in Laravel 5
PPT
PHP Security
PDF
Apache - Quick reference guide
PDF
The Enterprise Wor/d/thy/Press
PPTX
Global Exception Handling Custom Error Connector In MuleSoft
PDF
LOG4J VULNERABILITY SAP BUSINESS ONE IMPACT AND WORK AROUNDS
PPTX
lecture 15.pptx
PPT
Php manish
PPT
ASP.NET 05 - Exception Handling And Validation Controls
PPTX
Php session 3 Important topics
ODP
Laravel 5.3 - Web Development Php framework
Php security
PHP - Introduction to PHP Error Handling
Error Handling In PHP with all Try catch anf various runtime errors
Php Ppt
Download It
Error management
Error reporting in php
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
MidwestPHP 2016 - Adventures in Laravel 5
PHP Security
Apache - Quick reference guide
The Enterprise Wor/d/thy/Press
Global Exception Handling Custom Error Connector In MuleSoft
LOG4J VULNERABILITY SAP BUSINESS ONE IMPACT AND WORK AROUNDS
lecture 15.pptx
Php manish
ASP.NET 05 - Exception Handling And Validation Controls
Php session 3 Important topics
Laravel 5.3 - Web Development Php framework
Ad

More from Mindfire Solutions (20)

PDF
Physician Search and Review
PDF
diet management app
PDF
Business Technology Solution
PDF
Remote Health Monitoring
PDF
Influencer Marketing Solution
PPTX
IOT Hands On
PPTX
Glimpse of Loops Vs Set
ODP
Oracle Sql Developer-Getting Started
PPT
Adaptive Layout In iOS 8
PPT
Introduction to Auto-layout : iOS/Mac
PPT
LINQPad - utility Tool
PPT
Get started with watch kit development
PPTX
Swift vs Objective-C
ODP
Material Design in Android
ODP
Introduction to OData
PPT
Ext js Part 2- MVC
PPT
ExtJs Basic Part-1
PPT
Spring Security Introduction
PPT
Angular In Depth
PPT
Django Models
Physician Search and Review
diet management app
Business Technology Solution
Remote Health Monitoring
Influencer Marketing Solution
IOT Hands On
Glimpse of Loops Vs Set
Oracle Sql Developer-Getting Started
Adaptive Layout In iOS 8
Introduction to Auto-layout : iOS/Mac
LINQPad - utility Tool
Get started with watch kit development
Swift vs Objective-C
Material Design in Android
Introduction to OData
Ext js Part 2- MVC
ExtJs Basic Part-1
Spring Security Introduction
Angular In Depth
Django Models
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PPTX
Transform Your Business with a Software ERP System
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
medical staffing services at VALiNTRY
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPT
Introduction Database Management System for Course Database
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Introduction to Artificial Intelligence
PPTX
L1 - Introduction to python Backend.pptx
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Odoo POS Development Services by CandidRoot Solutions
Nekopoi APK 2025 free lastest update
Transform Your Business with a Software ERP System
ManageIQ - Sprint 268 Review - Slide Deck
VVF-Customer-Presentation2025-Ver1.9.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
How to Choose the Right IT Partner for Your Business in Malaysia
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
medical staffing services at VALiNTRY
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
How Creative Agencies Leverage Project Management Software.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Understanding Forklifts - TECH EHS Solution
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction Database Management System for Course Database
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Introduction to Artificial Intelligence
L1 - Introduction to python Backend.pptx
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Odoo POS Development Services by CandidRoot Solutions

ELMAH

  • 1. ELMAH Error Logging Modules And Handler Presenter: Harsh Wardhan, Mindfire Solutions Date: 08/07/2015
  • 2. Presenter: Harsh Wardhan, Mindfire Solutions Agenda - Importance of error logging. - Introducing ELMAH. - Installing and configuring ELMAH. - Best practices.
  • 3. Presenter: Harsh Wardhan, Mindfire Solutions Importance of error logging  Helps in tracking bug.  Helps to evaluate application health.  Organised logs save development time.
  • 4. Presenter: Harsh Wardhan, Mindfire Solutions Introducing ELMAH  Stands for Error Logging Modules And Handlers.  An open source project created by Atif Aziz.  Completely pluggable.  Logs nearly all unhandled exceptions.  Provides a web page to display all the logged errors.
  • 5. Presenter: Harsh Wardhan, Mindfire Solutions Introducing ELMAH  Provides e-mail, twitter notification for all the errors as they occur.  RSS feed of last 15 errors logged.  Provides different log storing options including in- memory, SQL Server, SQLite.
  • 6. Presenter: Harsh Wardhan, Mindfire Solutions Installing ELMAH  Adding ELMAH assembly. Just drop the dll on your application's bin folder. OR Install ELMAH NuGet package.
  • 7. Presenter: Harsh Wardhan, Mindfire Solutions Configuring ELMAH  Adding a section group which has information on how to log exceptions.  Adding a http module to log exception.  Adding a http handler to view exception.  Elmah section to set the logger type and other settings.
  • 8. Presenter: Harsh Wardhan, Mindfire Solutions Configuring ELMAH  Adding a section group which has information on how to log exceptions. <configSections> <sectionGroup name="elmah"> <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/> <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /> <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/> </sectionGroup> </configSections>
  • 9. Presenter: Harsh Wardhan, Mindfire Solutions Configuring ELMAH Adding a http module to log exception. <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /> </modules> <handlers> <add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" /> </handlers> </system.webServer>
  • 10. Presenter: Harsh Wardhan, Mindfire Solutions Configuring ELMAH  Adding a http handler to view exception. <system.web> <httpHandlers> <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /> </httpHandlers> <httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/> </httpModules> </system.web>
  • 11. Presenter: Harsh Wardhan, Mindfire Solutions Configuring ELMAH  Elmah section to set the logger type and other settings. <elmah> <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ELMAHConnectionString" /> </elmah>
  • 12. Presenter: Harsh Wardhan, Mindfire Solutions Logging handled exceptions  Raise an exception using ErrorSignal class of elmah. ErrorSignal.FromCurrentContext().Raise(new Exception("I did it..."));
  • 13. Presenter: Harsh Wardhan, Mindfire Solutions Best Practices  Secure your logs by restricting remote access. <elmah> <security allowRemoteAccess="False" /> </elmah>  Set roles to access the log.
  • 14. Presenter: Harsh Wardhan, Mindfire Solutions Question and Answer
  • 15. Presenter: Harsh Wardhan, Mindfire Solutions Thank you