What is the best method to achieve dynamic URL Rewriting in ASP.Net?

此生再无相见时 提交于 2019-12-03 04:04:17

System.Web.Routing is part of .NET 3.5 SP1 and you can use it both for your ASP.NET WebForm-application and your MVC-application.

The official ASP.NET site has a good QuickStart Tutorial on System.Web.Routing.

ISAPI_Rewrite is also a good generic solution - works not only with ASP.NET but with any other system.

An alternative approach to consider is URL routing. This is not the same as rewriting (rewriting involves changing one URL to another whilst routing involves directly mapping dynamic URLs to different parts of your application) and is not so easy to implement for an existing project, but if you're starting a project from scratch you might find this a better approach depending on your exact requirements. On the other hand, it may be no use to you at all, but at least you can make an informed decision!

Following the suggestion made by Seb Nilsson I looked a bit all over google and found these nice examples:

When working with IIS 6 it is important to have a look at this Blog

IIS 7 comes with a rewrite module

You can find further links in this wikipedia article

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!