3

I am trying to use ELMAH for my error logging, and I've tried several others

Neither of which seem to log errors when the custom error feature in ASP.NET is enabled

I'm using the [HandleError] attribute in all my controllers, at first I thought that was the problem but it isn't just whenever I enable the custom error pages it doesn't log any errors even though half these error logging libraries say they are suppose to.

What am I doing wrong?

2
  • Handle error only handles error thrown by actions, errors like invalid params for actions are not being handled by handleerror atribute, how do you log those messages Commented Nov 6, 2010 at 19:34
  • Possible duplicate of How to get ELMAH to work with ASP.NET MVC [HandleError] attribute? Commented Apr 20, 2016 at 14:48

2 Answers 2

5

A couple things to check are that you have your HttpModule registered for ELMAH. You don't have any other process intercepting the errors.

Sign up to request clarification or add additional context in comments.

4 Comments

Yeah I have everything setup properly from what I can see and nothing else intercepting errors except like I said the [HandleError] Attribute..hmm think I just answered my own question.
Yep thats what it was the [HandleError] attribute.
You have to make your own HandleError to log the errors and handle the error routing
I didn't understand what is the solution for this, I have the same problem.
1

For some reason, removing the page level ErrorPage redirects resolved the problem for me. The redirect in the web.config (cUstomErrors tag) works but the page level redirects stop elmah from logging errors. Just something quick and easy to check for. Hope that helps some folk in my situation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.