开发者

ASP.NET Routing or URL Rewriting?

开发者 https://www.devze.com 2023-01-23 12:49 出处:网络
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\" p

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 o开发者_高级运维ne 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号