ASP.NET 2.0 and Url Rewrite – Advance
ASP.NET 2.0 support Url Rewrite : http://aspnet.4guysfromrolla.com/articles/011007-1.aspx
Several people have asked why the built-in URL Mapper in ASP.NET 2.0 doesn’t support regular expressions. There were actually a few reasons for this — one of the big ones being that just about the time we were about to consider adding it my team started also working on IIS7. We realized that a full-featured version would want/need to take advantage of some of the new features in IIS7 as well as the support all content types (in particular — images and directories). So we postponed making it feature rich until a future version.
It’s a shame given that it only takes 20 lines to support a regex based URL rewriter – and that IIS7 won’t even be launched until Longhorn Server, sometime in 2007 (and even then, most IT depts will wait for SP1 before deploying)
The Whidbey URL mapper was written mid-2003, it’s a shame in the intervening 2 years 20 lines of code couldn’t be written and tested.
AND HERE IS THE REASON :
It only takes 20 lines to support a basic regex based URL rewriter. But if you want it to be secure and scalable it takes a lot more work.
Specifically, you need to do a lot of work to make sure that you aren’t succeptible to denial of service attacks where remote users send urls that cause computationally intensive regex queries to spin your CPUs.
The 20 line sample you have in your website doesn’t deal with this, and probably doesn’t need to if it is only used on the occasional server. But Microsoft can’t get away with that if we install it on 4 million servers (that would be too big a target).
Finally, the solution : http://www.urlrewriting.net/en/Download.aspx
Yes it is! It can be freely shared and distributed, changed, developed and used for any commercial cases. But we take no warranty for erroless using the software.
It is a rewrite-module tuned for ASP.NET 2.0, and offers support for
- Themes and Masterpages
- Regular Expressions
- good Postback-Urls
- Cookieless Sessions
- Runs in Shared-Hosting or Medium-Trust enviroments
- OutputCache is supported
- Redirects possible, even to other Domains
The setup is also quick🙂
No, and is not planned. You can use the original version from Fabrice Marguerie.
No, this is not possible without changing the IIS configuration because these requests are directly not handled by ASP.NET 2.0
Yes if you can change the IIS Configuration, take a look the UrlRewritingNet documentation.
Chưa có phản hồi.
Bài viết mới nhất
Ý kiến mới nhất
niah on Một cô gái 17 tuổi thông báo v… Nihit on XmlException: The data at the… Kranthi on How To: Encrypt Configuration… Dhaval on XmlException: The data at the… Nguyễn Sơn on eRec search
- 19,846 lượt xem
Gửi tin nhắnadfsdfdasfsf sadf as df asd f
Site infoIncomplete Leo
Tạo một website miễn phí hoặc 1 blog với WordPress.com.