locked
HttpHandler to read all extensions RRS feed

  • Question

  • User1885235682 posted

    I've written an HttpHandler to act as a proxy to other websites.  On my local machine, everything works fine.  At the server, however, I have to setup mappings for every extension I expect to handle, but I don't know all of what I may have to deal with.  When I try to setup a ".*" extension, IIS/MMC rejects it.  How can I setup an extension-less mapping?

    Monday, August 20, 2007 8:28 PM

All replies

  • User1622957740 posted

    Are you sure you have the mapping right? Wildcard extensions in IIS work but you should also make sure that you don't check the 'Check that file exists' option so that you can load dynamic URLs. If you do then the file must physically exist on disk which can cause your problems.

    That said - be very careful with wildcard extensions, because as the name suggests EVERYTHING from images to scripts to CSS will be routed through your Web application which can have some adverse effects on performance as IIS can no longer cache files and send files directly from disk. It's usually a better idea to map just what you actually need to handle explicitly unless you truly want everything to pass through your handler or module.

    FWIW, in IIS 7 in integrated mode all content can go through a module/handler without any special configuration...

    Hope this helps,

    +++ Rick ---

    Tuesday, August 21, 2007 10:55 PM
  • User1885235682 posted

    When I try to specify ".*" or "." as the extension in IIS6/Win2003, it tells me the format is invalid.  More specifically, I edit the website site properties and choose Home Directory -> Configuration -> Add.  Under "Extension" I try those previously mentioned and any attempt to click the OK button results in the message "Wrong extension format" for both entries.  Leaving it blank grays out the OK button.

    Wednesday, August 22, 2007 12:11 AM