简体   繁体   中英

ASP.NET Routing or URL Rewriting?

I'm currently using URL Rewriting, but I recently stumbled upon this link on Rerouting , and it looks like it's quite simple yet powerful, and easier to implement than URL Rewriting, a "downside" probably is that configurations are not sitting on a web.config file but rather on the code itself, but I was wondering about the differences, and advantages of using one over the other.

Having read some resources about routing, I can see the differences, and now I reformulate my question:

Is it worth it to move from URL Rewriting to Routing?
Are there any IIS-specific configurations that should be made?
Is it recommended to use it on a ASP.NET WebForms Application, or is it oriented to other kind of projects?

IMO URL Rewriting has been a workaround in many cases. Rerouting is one of the concepts that supersede URL Rewriting in that cases. In Short: If Rerouting works in your case, you should use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM