Reputation: 32301
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.
routes.IgnoreRoute("elmah.axd");
my login works. IF I leave it in there it always redirects to elmah.
Upvotes: 2
Views: 1195
Reputation: 32301
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.
Upvotes: 4
Reputation: 6955
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
Upvotes: 0
Reputation: 181094
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?
Upvotes: 1
Reputation: 8764
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
Upvotes: 2
Reputation: 29664
Watch the traffic on FIDDLER. It should give you some clues as to what's going on.
Upvotes: 0