Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgnoreDefaultRoute doesn't seem to have any effect #88

Open
bborad opened this issue Sep 22, 2016 · 6 comments
Open

IgnoreDefaultRoute doesn't seem to have any effect #88

bborad opened this issue Sep 22, 2016 · 6 comments

Comments

@bborad
Copy link

bborad commented Sep 22, 2016

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
Copy link

sfhaney commented Apr 3, 2017

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

@bborad
Copy link
Author

bborad commented Apr 20, 2017

not yet

@JohnMcAvinue
Copy link

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
Copy link
Contributor

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

@alexbeletsky
Copy link
Owner

Thanks a lot @peterdew

@peterdew
Copy link
Contributor

(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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants