views:

213

answers:

1

I have a custom HttpModule rewrite engine in an existing web application project that maps urls of the form

/tom/dick/harry/.../.../...

to a hierarchical navigation system stored in a database, ultimately resulting in a HttpContext.Current.RewritePath() call to the .aspx page that the requested path resolves to.

I'm interested in mixing MVC in with the existing app. If the MVC code works well and provides real benefit over the code behind model, how will I handle precedence between my rewrite engine and the routetable? Is the routetable referenced before the HttpModule, after? Are both called?

+2  A: 

The routing in ASP.NET MVC is implemented as a custom HttpModule (UrlRoutingModule), so which takes precedence will depend on the order your modules are declared in web.config

Darin Dimitrov