Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using ISAPI filter with .net for URL Rewriting

Reply
Thread Tools

Using ISAPI filter with .net for URL Rewriting

 
 
Jon Maz
Guest
Posts: n/a
 
      09-29-2004
Hi All,

I've been looking into options for URL Rewriting in .net, and to be honest,
I haven't seen anything that's easier than the old Classic Asp solution with
an ISAPI filter redirecting to an .asp page with responsibility for handling
the redirect.

I'm now planning to use this solution with my next .net project, and was
wondering if anyone else out there has done this already, and what problems
(if any) arise. Hopefully the news is that the solution works just as
easily as before.

I *am* aware that there is a dotnet alternative to an ISAPI filter. I found
a decent Scott Mitchell article
(http://msdn.microsoft.com/library/de...-us/dnaspp/htm
l/urlrewriting.asp) on a URL Rewriting using Http modules, but I have some
reservations about using this method:

(a) it seems a lot more complex than the ISAPI solution.
(b) if you want to be able to handle URL's of the form
"www.apple.com/products", you still have to create a physical "products"
folder AND put an empty Default.aspx file in it, neither of which are true
of the ISAPI solution.
(c) depending how you implement the .net solution, Forms or Windows
Authentication may cease to work.
(d) to solve a postback issue you have to use an Actionless Server-side Form
instead of the standard .net one throughout your site.

So, does anyone have experience using an ISAPI Filter with .net, and was it
a good, bad or indifferent experience?

TIA,

JON

PS First posted to aspmessageboard:
http://www.aspmessageboard.com/forum...31069&F=36&P=1



 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      09-29-2004
HI Jon:

a) The complexity depends on how much you want to do with the URL
re-writing. To me, URL rewriting from managed code isn't even in the
same order of complexity as an ISAPI filter. An HttpModule is easier
to configure, easier to write, easier to debug, and more robust at
runtime.

b) You can avoid creating physical directories by mapping all requests
through the ASP.NET runtime (in the script map settings of IIS).

c) This I have not seen a problem with, but you would have to be
careful where the RewritePath occurs, I imagine the same could be said
of the ISAPI solution.

d) Scott's article is great, but it does miss one simple solution to
this problem. Once you are inside the destgination page, simply
rewrite the path back to the original raw URL. This does not actually
'redirect' the request, but it does allow the runtime to write out the
correct action attribute in the form tag. It's a simple, one line
solution to the problem. I blogged about this here:

The Passion and the Fury of URL Rewriting
http://odetocode.com/Blogs/scott/arc...09/22/509.aspx

HTH,

--
Scott
http://www.OdeToCode.com/


On Wed, 29 Sep 2004 11:08:23 +0100, "Jon Maz" <>
wrote:

>Hi All,
>
>I've been looking into options for URL Rewriting in .net, and to be honest,
>I haven't seen anything that's easier than the old Classic Asp solution with
>an ISAPI filter redirecting to an .asp page with responsibility for handling
>the redirect.
>
>I'm now planning to use this solution with my next .net project, and was
>wondering if anyone else out there has done this already, and what problems
>(if any) arise. Hopefully the news is that the solution works just as
>easily as before.
>
>I *am* aware that there is a dotnet alternative to an ISAPI filter. I found
>a decent Scott Mitchell article
>(http://msdn.microsoft.com/library/de...-us/dnaspp/htm
>l/urlrewriting.asp) on a URL Rewriting using Http modules, but I have some
>reservations about using this method:
>
>(a) it seems a lot more complex than the ISAPI solution.
>(b) if you want to be able to handle URL's of the form
>"www.apple.com/products", you still have to create a physical "products"
>folder AND put an empty Default.aspx file in it, neither of which are true
>of the ISAPI solution.
>(c) depending how you implement the .net solution, Forms or Windows
>Authentication may cease to work.
>(d) to solve a postback issue you have to use an Actionless Server-side Form
>instead of the standard .net one throughout your site.
>
>So, does anyone have experience using an ISAPI Filter with .net, and was it
>a good, bad or indifferent experience?
>
>TIA,
>
>JON
>
>PS First posted to aspmessageboard:
>http://www.aspmessageboard.com/forum...31069&F=36&P=1
>
>


 
Reply With Quote
 
 
 
 
Jon Maz
Guest
Posts: n/a
 
      09-30-2004
Very helpful Scott, many thanks.

JON


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
does url rewriting use isapi trooperbill ASP General 5 08-04-2006 05:37 AM
Atlas problem with clean URLs using ISAPI Filter "Isapi_Rewrite" Jeeran ASP .Net 4 07-06-2006 01:57 AM
rewriting urls with isapi filters in .net Dan ASP .Net 0 07-27-2005 06:58 PM
How to install ISAPI filter for Url Rewriting? =?Utf-8?B?U2VyZw==?= ASP .Net 4 03-29-2005 01:25 AM
url rewriting when the url contains parameters Gaurav Agarwal Java 2 01-31-2005 11:15 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57