3

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

2 Answers 2

2

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?

Sign up to request clarification or add additional context in comments.

4 Comments

Yeah, disabling routing kinda defeats the whole MVC paradigm
@PieterG, you are absolutely right, routing is a core component in the MVC paradigm.
I couldn't agree more. There is no point in disabling routing in MVC. Also, 'a few cpu cycles' is nothing in a web application. The mere TCP overhead is probably a millionfold.
We would like to do the same - we are using AngularJS so the MVC URL routing is redundant. We are still using other parts of the MVC framework though. Removing the routing from the Global.asax.cs and web.config doesn't work as IIS Express is not able to serve up pages (404 and 403 errors)
1

Remove the routes set in the Global.ascx

2 Comments

I get this error..."The incoming request does not match any route"
Remove the routing entries from the web.config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.