473,769 Members | 4,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2983
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_auth or_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_autho r_plug>
----------------------------------------------

"Jon Sequeira" <js******@twcny .rr.com> wrote in message
news:#j******** ******@TK2MSFTN GP11.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********@bti nternet.com> wrote in message
news:#s******** ******@tk2msftn gp13.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_auth or_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_autho r_plug>
----------------------------------------------

"Jon Sequeira" <js******@twcny .rr.com> wrote in message
news:#j******** ******@TK2MSFTN GP11.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******** ******@TK2MSFTN GP11.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
1559
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 app has about 50 file extensions that we map in IIS and handle in our HTTPHandler to catch the reference and then lookup the correct content from a database. In addition, we do some magic in a HTTPModule to rewrite paths for file types we don't...
7
2578
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 http://my_machine_name/site) show problems when refresh the page. I guess some kind of javascript problems with the postback methods. Someone has any idea how can i fix it? Thanks
4
3912
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 database. For example, when a page set values to Session object such as Session("somevar")=1 then I want my HttpModule to get notified and store the value into the external database. The same for "getting" the variable, I want my own...
4
1612
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 using the <remove> element to remove the HttpModule for a subdir have not worked. ---- My top-level Web.config contains :
2
2144
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) Implements IHttpModule.Init httpApp = context
2
4586
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 into the process, does each instance of HttpApplication keep its own set of HttpModule instance or HttpModules are shared among all HttpApplication instances? 2. In case of HttpApplication keep its own set of HttpModule, does the HttpModule...
1
1902
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 behavior. My module only runs for the extensions handled by the aspnet_isapi.dll. Here are my sequence of steps: 1) Create the HttpModule 2) Compile and drop dll in the webApp bin directory.
0
1135
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 listen for a response from this 2nd tier and will cache the results in a large table for service subsequent requests. I notice that the HttpModule will unload from time to time and realize this is normal behavior but was wondering if there was...
3
1837
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 it to the appropriate upstream server. Since transaction processing is largely identical regardless of the transaction details (these will be handled by an upstream sever) I'm thinking of implementing my application as an HttpModule. But I'm...
0
9589
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
10045
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...
0
9863
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
8870
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...
1
7408
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.