HttpModule for ASP and ASP.NET URL filtering

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Sequeira

    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


  • John Timney \(Microsoft MVP\)

    #2
    Re: HttpModule for ASP and ASP.NET URL filtering

    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" <jsequeir@twcny .rr.com> wrote in message
    news:#jQAbo0ODH A.1216@TK2MSFTN GP11.phx.gbl...[color=blue]
    > 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[/color]
    rewriting,[color=blue]
    > and then on to the standard ASP handler?
    >
    > Any insights are appreciated.
    >
    > --Jon
    >
    >[/color]


    Comment

    • Jon Sequeira

      #3
      Re: HttpModule for ASP and ASP.NET URL filtering

      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)" <xyztimneyj@bti nternet.com> wrote in message
      news:#sF5qs1ODH A.3836@tk2msftn gp13.phx.gbl...[color=blue]
      > I've seen this asked a few times but never seen it work. ASP would have[/color]
      to[color=blue]
      > 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[/color]
      contained[color=blue]
      > 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" <jsequeir@twcny .rr.com> wrote in message
      > news:#jQAbo0ODH A.1216@TK2MSFTN GP11.phx.gbl...[color=green]
      > > I'm interested in writing an HttpModule to clean up URLs for a site[/color][/color]
      that's[color=blue][color=green]
      > > 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.[/color][/color]
      I[color=blue][color=green]
      > > understand basically how to do this for my .aspx pages, but how do I[/color][/color]
      tell[color=blue][color=green]
      > > IIS to pass .asp page requests through my ASP.NET module for URL[/color]
      > rewriting,[color=green]
      > > and then on to the standard ASP handler?
      > >
      > > Any insights are appreciated.
      > >
      > > --Jon
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • gerry

        #4
        Re: HttpModule for ASP and ASP.NET URL filtering

        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" <jsequeir@twcny .rr.com> wrote in message
        news:#jQAbo0ODH A.1216@TK2MSFTN GP11.phx.gbl...[color=blue]
        > 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[/color]
        rewriting,[color=blue]
        > and then on to the standard ASP handler?
        >
        > Any insights are appreciated.
        >
        > --Jon
        >
        >[/color]


        Comment

        Working...