alexbeletsky / elmah-mvc

Painless integration of ELMAH into ASP.NET MVC application
http://nuget.org/packages/Elmah.MVC
Apache License 2.0
266 stars 61 forks source link

IgnoreDefaultRoute doesn't seem to have any effect #88

Open bborad opened 8 years ago

bborad commented 8 years ago

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

sfhaney commented 7 years ago

I am also having this issue and wasn't sure if I was just doing something wrong. Did you find a solution?

bborad commented 7 years ago

not yet

JohnMcAvinue commented 7 years ago

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

peterdew commented 6 years ago

I'll take a look asap. I could reproduce the issue, but did not find a cause yet.

alexbeletsky commented 6 years ago

Thanks a lot @peterdew

peterdew commented 6 years ago

(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