Wildcard configuration for HttpHandler

Last post 12-02-2007 8:12 PM by mbanavige. 3 replies.

Sort Posts:

  • Wildcard configuration for HttpHandler

    11-29-2007, 8:09 PM
    • Member
      point Member
    • wpw
    • Member since 11-01-2007, 11:42 AM
    • Posts 4
    Hi Just a simple clarification, which I could't manage to fine while googling, can we configure a HttpHandler to handle any type of url, includinf the once without any files attached at the end just like http://mysever/testsite/ and any file extension when the file is not existing? Thanks in advance wpw
  • Re: Wildcard configuration for HttpHandler

    11-29-2007, 8:34 PM
    Answer
    • All-Star
      96,448 point All-Star
    • mbanavige
    • Member since 11-06-2003, 8:29 AM
    • New England, USA
    • Posts 10,218
    • Moderator
      TrustedFriends-MVPs
    Mike Banavige
    ~~~~~~~~~~~~
    Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
  • Re: Wildcard configuration for HttpHandler

    12-02-2007, 6:13 PM
    • Member
      point Member
    • wpw
    • Member since 11-01-2007, 11:42 AM
    • Posts 4

    Thanks lot, that is a good one, I think the point is the following part in web.config file and which redirects all the .aspx files.

    <httpHandlers>
        <add verb="*" 
             path="*.aspx" 
             type="PageBuilder, AssemblyName"/>
    </httpHandlers>
     
    This works fine with files with known extension, but it does not work when I put the wildcard as below;
    <httpHandlers>
        <add verb="*" 
             path="*.*" 
             type="PageBuilder, AssemblyName"/>
    </httpHandlers>
     
    I might be doing something definitly wrong here but I still could;t find it
     
     
  • Re: Wildcard configuration for HttpHandler

    12-02-2007, 8:12 PM
    • All-Star
      96,448 point All-Star
    • mbanavige
    • Member since 11-06-2003, 8:29 AM
    • New England, USA
    • Posts 10,218
    • Moderator
      TrustedFriends-MVPs

    If you refer to part 2 of that article, you'll see that the wildcard mapping needs to occur at the IIS level.  This is necessary to direct all requests (regardless of their extension) to aspnet_isapi.dll.

     

    Mike Banavige
    ~~~~~~~~~~~~
    Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
Page 1 of 1 (4 items)