473,748 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using ISAPI filter with .net for URL Rewriting

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.as p) 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

Nov 18 '05 #1
2 2596
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" <jo****@surfeuN OSPAM.de>
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.as p) 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.c om/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
Authenticati on 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


Nov 18 '05 #2
Very helpful Scott, many thanks.

JON
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1653
by: Aintzane | last post by:
Hi! Sorry if I'm asking silly things, but I'm new with ISAPI Filters. That's what my filter does. When a user makes a request the filter verifies if the user has already entered his password. If it hasn't been entered, the user is redirected to the login page, and after that it's returned to the previously requested page. But to do all this I need to keep some information about the session, and in ISAPI filter each HTTP request is "a...
1
1250
by: balaji | last post by:
How can i design an ISAPI Filter that works with IIS-6.0 on win 2003 platform. I already have an ISAPI Filter that i designed for working with IIS 5.x and that works fine . I am finding a problem with the ISAPI Filter designed for IIS 6 since the SF_NOTIFY_READ_RAW_DATA is not supported. Can anyone suggest an alternative for the above notification? thks for any help.
0
919
by: MadhaviAgashe | last post by:
Hi, I have developed a web service in C# and it has methods t authenticate a user using Single Sign On. I am trying to access this web service from an ISAPI filter which i developed in VC++. I know that the property of my isapi filter has to b customised to suit using a web service. Can someone help me in doin this unmanaged to managed code access? Regards, Madhav
1
7229
by: Michael Shutt | last post by:
We have an existing ISAPI filter that performs authentication for all pages on our web site, including pages we are now writing for ASP.NET. The filter is pretty basic, receiving the user name and password in clear text and checking them against a database of users. The filter has been in use for some time with classic ASP pages. From classic ASP pages, the application can retrieve the login name that the user entered from...
1
1621
by: Jeremy | last post by:
Hi there, We recently upgraded to the 1.1 framework, and of course, all of our 1.0 asp.net apps starting using the 1.1 framework, which we didn't want to happen. I found an MS article saying if you modify the ISAPI filter setting in IIS for the site to point to the 1.0 aspnet_filter.dll, your app will then use the 1.0 framework.
4
1899
by: Serg | last post by:
How do I install ISAPI filter in IIS? I need ISAPI filter to process folder paths such as http://MyUrl/folder1/folder2/folder3 There is no "ISAPI filters" tab in my IIS. Thanks!
4
4792
by: Yet another C# coder | last post by:
Hi, Does anyone know if in the next version of asp.net / C# (2.0) Would be possible to write an ISAPI Filter in C#? Thanx.
4
1909
by: Jeeran | last post by:
We use an ISAPI filter to convert long urls into short clean ones. For example: "Site.com/user/john/" Is re-written as: "Site.com/user/userinfo.aspx?uid=john" Now, "userinfo.aspx" contains a web user control which uses some Atlas functionality; The web user control contains a "DataList" which gets updated asynchronously through Atlas when the user clicks a button –the button is the Atlas trigger.
0
1655
by: Chris Curvey | last post by:
Hi all, I'm trying to write an ISAPI filter in Python, using the examples that come in the "isapi" directory of the win32com package. The installation program itself runs fine, but when I examine the properties of my web server, my filter has a big red down arrow next to it. But I can't seem to figure out where I should be looking to find the trouble. If anyone can point me to the right place (or see an obvious error in the code...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.