Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3349752
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:42:11+00:00 2026-05-18T01:42:11+00:00

I am using ELMAH in my ASP.NET MVC projects and I really like its

  • 0

I am using ELMAH in my ASP.NET MVC projects and I really like its simplicity. But I needed the ability to log certain events in my code in a log.Info(“message”) manner. Since ELMAH does not provide that ability I started looking at NLog.

A few questions came to mind:

  1. Is using both ELMAH and NLog overkill? Using ELMAH for unhandled exceptions and NLog for everything else?
  2. Is it possible to configure NLog to log unhandled exceptions in the nlog.config or is custom code needed?
  3. If custom code is needed where would be the best place to add it? The OnException method in the MVC framework? The global.asax file?

Anny feedback is greatly appreciated. So far I haven’t found any good posts on this matter?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:42:12+00:00Added an answer on May 18, 2026 at 1:42 am

    You can in fact trigger an alert from ELMAH. Like so:

     ErrorSignal.FromCurrentContext().Raise(new System.ApplicationException("An error occured in SendEmail()", ex));
    

    Don’t forget to add a reference to elmah.dll and add using Elmah; to the file.
    See here for a bit more examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setup: For an ASP.NET MVC 4 app I am using Elmah.MVC 2.0.1 to log
I'm using ELMAH to handle the exceptions in my ASP.Net MVC project. I would
I am using elmah with an asp.net mvc 3 site and it works fine
I have created a website using ASP.NET MVC and use ELMAH for error handling,
I am using ELMAH to log unhandled exceptions in an ASP.NET Webforms application. Logging
I am using Elmah for logging in a ASP.NET MVC project and I am
We're using ELMAH for handling errors in our ASP.Net MVC c# application and in
I' m using Elmah https://github.com/alexanderbeletsky/elmah.mvc for a MVC .net project. For log/in the error
I try to run ELMAH with my ASP.NET MVC 2 project but have some
We have integrated ELMAH with ASP.NET MVC 3, as a way to log application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.