Question

I am having some trouble getting Elmah to work with url routing in an asp.net webforms application. Elmah is mapped to "elmah.aspx" and I have tried a couple of variations on:

routes.Add(new Route("elmah.aspx", new StopRoutingHandler()));

Is there a way I can ignore all .aspx pages?

Was it helpful?

Solution

UPDATED:

Please look at step 4 on the elmah Google Code page.

To ignore all .aspx files. You just do:

routes.Add(new Route("*\.aspx", new StopRoutingHandler()));

You could also do:

routes.IgnoreRoute("*\.aspx");

Please refer to msdn.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top