473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

HttpModule for ASP and ASP.NET URL filtering

I'm interested in writing an HttpModule to clean up URLs for a site that's
in a transitional phase from ASP to ASP.NET. Basically, I'd like to hide
some very messy querystrings (which are Google-proof-- they use GUIDs as
query parameters) and use more memorable names in the URLs.

I'd like this module to work for both ASP and ASP.NET pages in the site. I
understand basically how to do this for my .aspx pages, but how do I tell
IIS to pass .asp page requests through my ASP.NET module for URL rewriting,
and then on to the standard ASP handler?

Any insights are appreciated.

--Jon
Nov 17 '05 #1
3 2969
I've seen this asked a few times but never seen it work. ASP would have to
be pointed to the ASP.NET ISAPI handler in IIS, then you would need to
remove the block in machine.config (cant remember the exact setting) that
dissallows processing of ASP pages by ASP.NET. Potentially the handler
could intercept the URL request before it realised the target page contained
ASP and redirect accordingly.

Look at the App Mappings section of your web application to see and change
what the extensions are mapped too.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Jon Sequeira" <js******@twcny.rr.com> wrote in message
news:#j**************@TK2MSFTNGP11.phx.gbl...
I'm interested in writing an HttpModule to clean up URLs for a site that's
in a transitional phase from ASP to ASP.NET. Basically, I'd like to hide
some very messy querystrings (which are Google-proof-- they use GUIDs as
query parameters) and use more memorable names in the URLs.

I'd like this module to work for both ASP and ASP.NET pages in the site. I
understand basically how to do this for my .aspx pages, but how do I tell
IIS to pass .asp page requests through my ASP.NET module for URL rewriting, and then on to the standard ASP handler?

Any insights are appreciated.

--Jon

Nov 17 '05 #2
Thanks, John.

In researching this, I've come across at least one reference implying that
this limitation was going to be addressed and fixed in IIS6. Do you know
anything about that?

--Jon

"John Timney (Microsoft MVP)" <xy********@btinternet.com> wrote in message
news:#s**************@tk2msftngp13.phx.gbl...
I've seen this asked a few times but never seen it work. ASP would have to be pointed to the ASP.NET ISAPI handler in IIS, then you would need to
remove the block in machine.config (cant remember the exact setting) that
dissallows processing of ASP pages by ASP.NET. Potentially the handler
could intercept the URL request before it realised the target page contained ASP and redirect accordingly.

Look at the App Mappings section of your web application to see and change
what the extensions are mapped too.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Jon Sequeira" <js******@twcny.rr.com> wrote in message
news:#j**************@TK2MSFTNGP11.phx.gbl...
I'm interested in writing an HttpModule to clean up URLs for a site that's in a transitional phase from ASP to ASP.NET. Basically, I'd like to hide
some very messy querystrings (which are Google-proof-- they use GUIDs as
query parameters) and use more memorable names in the URLs.

I'd like this module to work for both ASP and ASP.NET pages in the site. I understand basically how to do this for my .aspx pages, but how do I tell IIS to pass .asp page requests through my ASP.NET module for URL

rewriting,
and then on to the standard ASP handler?

Any insights are appreciated.

--Jon


Nov 17 '05 #3
you use ISAPI filters to do this type of url-rewriting before anything hist
asp or asp.net
search msdn for atl sample ISAPIfilter
"Jon Sequeira" <js******@twcny.rr.com> wrote in message
news:#j**************@TK2MSFTNGP11.phx.gbl...
I'm interested in writing an HttpModule to clean up URLs for a site that's
in a transitional phase from ASP to ASP.NET. Basically, I'd like to hide
some very messy querystrings (which are Google-proof-- they use GUIDs as
query parameters) and use more memorable names in the URLs.

I'd like this module to work for both ASP and ASP.NET pages in the site. I
understand basically how to do this for my .aspx pages, but how do I tell
IIS to pass .asp page requests through my ASP.NET module for URL rewriting, and then on to the standard ASP handler?

Any insights are appreciated.

--Jon

Nov 17 '05 #4

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

Similar topics

0
by: Bruce B | last post by:
Hi group, I'm experiencing some extreme weirdness over the last week with IIS related to it's Mappings and how .NET is behaving. I can't explain the behavior as it seems very random. Our...
7
by: nail | last post by:
Folks, I develop a HttpModule and it works correct, but one problem is occurs. After I register the httpmodule in the web.config, my pages (not testing http://localhost/site but...
4
by: Danny W | last post by:
Hi There! Is it possible to use HttpModule to replace the built-in ASP.NET Session object? I want to write a HttpModule that will handle storing and retrieving of session values from an external...
4
by: Chip Page | last post by:
Hello, In my top-level Web.config, I had added a number of httpModules. In a particular sub-directory in the application, I wish to prevent one of the HttpModules from executing. My attempts...
2
by: Simon-Pierre Jarry | last post by:
Hi, I created a custom HttpModule for managing the security of my application. in "Init" sub, I regsiter the events doing that : Public Sub Init(ByVal context As System.Web.HttpApplication)...
2
by: walter | last post by:
Hi there, I know there is pool of HttpApplications, and for each request coming in, HttpRuntime will dedicate one from pool to serve the request. My questions are : 1. since HttpModule is plug...
1
by: Faraz | last post by:
Hi everyone, I am running into a slight problem. My understanding is that a custom HttpModule will run for every request made to the server, regardless of the extension. I do not experience this...
0
by: mattdev1000 | last post by:
Hello, I have an HttpModule that uses a lazy fetch to a secondary tier for calculating some values (the calculation is can be multisecond in the worse case). The HttpModule spins up a thread to...
3
by: Joseph Geretz | last post by:
I'm implementing a web application whose purpose in life is to act as a data conduit. Data is posted to my Web app in XML format, my application examines the data and forwards it onward by posting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.