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

Easy way to get the /elmah route to not work when a custom route is provided. #26

Closed
tdietrich513 opened this issue Apr 15, 2013 · 7 comments

Comments

@tdietrich513
Copy link

I've found that this works just fine.

 public static void RegisterRoutes(RouteCollection routes)
 {
        routes.IgnoreRoute("elmah");

        // rest of your route stuff goes here.
 }
@alexbeletsky
Copy link
Owner

@tdietrich513 please let me know, are you expecting any input here or you just share your findings? Can I close the issue?

@tdietrich513
Copy link
Author

Sharing my findings.

The wiki says:

You might change the elmah.mvc.route to a custom one, but still able to see ELMAH reports at /elmah. This issue is caused by the way how ASP.NET MVC matches controllers in separate namespaces. There are no good workaround for that (at least one I know), so if I makes a trouble to you, I recommend to reconsider the application, without using default route.

I wanted to share a good workaround for that, but I was unable to edit the wiki. You can go ahead and close the issue, but I was hoping you'd include this information on the wiki for other ELMAH + MVC users.

@alexbeletsky
Copy link
Owner

@tdietrich513 got it! thanks a lot for sharing that. Will put link to that issue.

@chaoaretasty
Copy link
Contributor

Might it be possible to add the ignoreroute in bootstrap.cs if the route has been customised?

@alexbeletsky
Copy link
Owner

Hm, that's sounds interesting.. But don't you think it could too destructive?

@chaoaretasty
Copy link
Contributor

Maybe have a config setting rather than automatically applying it. That way it wouldn't break if people are using both.

@alexbeletsky
Copy link
Owner

@chaoaretasty that makes sense to me.. would you like to consider to contribute that change?

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

3 participants