Luke101
Luke101

Reputation: 65268

How to disable ASP.NET MVC url routing

Just would like to know how do I disable URL Rewriting in asp.net MVC. I don't need url rewriting in my application and would like to turn it off. Reason: I am aware that url rewriting uses reflection and would like to save a few cpu cycles by avoiding it. Thanks

Upvotes: 2

Views: 3613

Answers (2)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038850

If you are concerned about performance then don't be. The routing engine, despite the fact that uses reflection is very optimized. Also if you turn routing off how do you expect your controller actions to be invoked?

Upvotes: 2

Dustin Laine
Dustin Laine

Reputation: 38503

Remove the routes set in the Global.ascx

Upvotes: 1

Related Questions