HttpModule for ASP and ASP.NET URL filtering

Discussion in 'ASP .Net' started by Jon Sequeira, Jun 25, 2003.

  1. Jon Sequeira

    Jon Sequeira Guest

    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
     
    Jon Sequeira, Jun 25, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:#...
    > 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
    >
    >
     
    John Timney \(Microsoft MVP\), Jun 25, 2003
    #2
    1. Advertising

  3. Jon Sequeira

    Jon Sequeira Guest

    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)" <> wrote in message
    news:#...
    > 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" <> wrote in message
    > news:#...
    > > 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
    > >
    > >

    >
    >
     
    Jon Sequeira, Jun 26, 2003
    #3
  4. Jon Sequeira

    gerry Guest

    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" <> wrote in message
    news:#...
    > 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
    >
    >
     
    gerry, Jun 26, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    956
  2. =?Utf-8?B?TWljaGFlbCBTLiBKb25lcw==?=

    Passing Data From HTTPModule to ASP.NET Page Instance

    =?Utf-8?B?TWljaGFlbCBTLiBKb25lcw==?=, Jan 17, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,048
    Matt Berther
    Jan 17, 2005
  3. =?Utf-8?B?U2FtdWVs?=

    HTTPModule and App_code ASP.NET 2.0

    =?Utf-8?B?U2FtdWVs?=, Aug 6, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,233
    Brock Allen
    Aug 7, 2005
  4. vertigo

    url filtering

    vertigo, Dec 17, 2006, in forum: Python
    Replies:
    1
    Views:
    296
    Dennis Benzinger
    Dec 17, 2006
  5. Just D.
    Replies:
    0
    Views:
    559
    Just D.
    Aug 11, 2004
Loading...

Share This Page