elmah-mvc
elmah-mvc copied to clipboard
IgnoreDefaultRoute doesn't seem to have any effect
Hi
I have am mvc + web api application in vs 2015. I have installed elmah.mvc and elmah.contrib.webapi packages and everything seem to be working fine with default settings.
Now I want to change the default /elmah url to admin/diagnostic/elmah (with admin only access authorisation ). I have set elmah.mvc.requiresAuthentication to true and elma.mvc.route to new route but it does not seem to have changed anything. I can still access the /elmah and nothing at new route (/admin/diagnostic/elmah).
Can anybody please let me know if I am missing anything or doing anything wrong?
Thanks
I am also having this issue and wasn't sure if I was just doing something wrong. Did you find a solution?
not yet
Amazingly it's still the same. Just installed the latest version () and specifying a custom route has no effect at all having set elmah.mvc.IgnoreDefaultRoute to true.
I'm surprised. I would have thought being able to do this would be a major requirement for anyone using this great package
I'll take a look asap. I could reproduce the issue, but did not find a cause yet.
Thanks a lot @peterdew
(correction: Didn't reproduce the issue, only made another configuration mistake with same results.)
@bborad I made the same changes as you in my config and I had no problems. The Controller is still named 'Elmah' though, with action 'Index' So when I use this actionlink-helper in my view:
@Html.ActionLink("Logging", "Index", "Elmah")
this wil render to
<a href="/admin/diagnostic/elmah">Logging</a>
Can you please try that with the requiresAuthentication set to false first? Also, why did you install elmah.contrib.webapi, since I don't need it. elmah.corelibrary and Elmah.Mvc suffice