Incomplete Leo

Something from my heart

ASP.NET 2.0 and Url Rewrite – Advance

ASP.NET 2.0 support Url Rewrite : http://aspnet.4guysfromrolla.com/articles/011007-1.aspx

BUT

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

01. Is UrlRewritingNet.UrlRewrite for free?

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.

02. What is the special about UrlRewritingNet?

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🙂

03. Is there a Version for ASP.NET 1.1?

No, and is not planned. You can use the original version from Fabrice Marguerie.

04. Are Rewrites possible without a Fileextension?

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.

Tháng Một 19, 2007 - Posted by | ASP.NET 2.0 Related

Chưa có phản hồi.

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: