2

I spent countless hours trying to get Elmah working with asp.net mvc, but can't get it working 100%. Right now all the logging works fine, but the HttpHandlers are all screwy. Everytime I try and log into an admin account I automatically get redirected to Elmahs listings page.

It makes no sense because the path for elmah is just elmah.axd (that's what I use for the httphandler in the web.config) and my admin path is something like /MyAdmin/login, so I don't see the connection. I have also setup the ignore routes thing in my routes table for elmah. \

To sum it up.

Elmah logging works and so does the error display pages. When I try and log in to my admin account it automatically redirect to Elmahs error display page. I have no idea why.

  • If I comment out

routes.IgnoreRoute("elmah.axd");

my login works. IF I leave it in there it always redirects to elmah.

5 Answers 5

4

I finally figured it out. No one would have got this one... I had a reference to RouteDebugger.dll which I got from the book "Asp.net MVC Framework Unleashed" and for some reason this dll messed up all my post requests if Elmah was enabled.

It was pure dumb luck that I figured it out. I couldn't get the RouteDebugger working so I deleted the reference and added a different one and then everything worked.

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

Comments

2

Google did a whole walk-through...

match your settings to theirs...

I didn't understand elmah and was able to do it.

http://code.google.com/p/elmah/wiki/MVC


-Mark

2 Comments

Thanks, but I went through this several times and no luck
whats the route for the admin section?
1

Guessing a bit, but can you try to use the Route Debugger to see if there is a problem hitting the correct route?

Also, is the IgnoreRoute call BEFORE all MapRoute calls?

Comments

0

Watch the traffic on FIDDLER. It should give you some clues as to what's going on.

1 Comment

I use Live Http Headers not sure if it's much different. When I clicked on my form button it just loads up elmah, it doesn't even show a redirect.
0

I think this is the updated version for setting it up, the one Hurricane pointed to was for earlier versions: http://code.google.com/p/elmah/wiki/DotNetSlackersArticle

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.