locked
Registering HttpHandler with IIS RRS feed

  • Question

  • User-510227478 posted

    I wrote code for an HttpHandler to handle requests to files of type *.hth. It works fine in the debug mode but when I deploy my files to the server or the local server it ignores the handler. I registered the handler in the web.config file.

     <add verb ="*" path=".hth" type="httpExt.SimpleHandler, httpExt" />

     if this doesn't work pls give me any other way that works.

     Thanks.

     

    Monday, February 5, 2007 3:52 PM

Answers

  • User-158764254 posted

    did you actually map it in iis or did you just add the extension to your web.config?  you need to do both.

    by default, Cassini handles all requests regardless of the extension which is why it would work when debugging.  on the other hand, IIS only maps requests for specific file extensions to the aspnet_isapi.dll.

    usually, you would use the .ashx extension when calling a handler as the .ashx extension has already been mapped to go to asp.net.  If you've decided to use an alternate extension, then you will need to configure IIS to map that extension to asp.net

    this article explains a little more: http://aspnet.4guysfromrolla.com/articles/020404-1.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 6, 2007 10:52 PM

All replies

  • User1439985827 posted
    You need to register the .hth extension to be handled by the ASP.NET ISAPI in IIS.
    Monday, February 5, 2007 6:59 PM
  • User-510227478 posted

    Thanks but I did that and it didn't work. It works only on the debug mode. Any Ideas?

     

    Monday, February 5, 2007 8:31 PM
  • User-158764254 posted

    did you actually map it in iis or did you just add the extension to your web.config?  you need to do both.

    by default, Cassini handles all requests regardless of the extension which is why it would work when debugging.  on the other hand, IIS only maps requests for specific file extensions to the aspnet_isapi.dll.

    usually, you would use the .ashx extension when calling a handler as the .ashx extension has already been mapped to go to asp.net.  If you've decided to use an alternate extension, then you will need to configure IIS to map that extension to asp.net

    this article explains a little more: http://aspnet.4guysfromrolla.com/articles/020404-1.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 6, 2007 10:52 PM