locked
Problem publishing to IIS 6 for site that uses http handler factory class. RRS feed

  • Question

  • User-511554929 posted
    I'm attempting to publish a web site that handles all requests via an http handler factory written in dotNet 2.  When I run through VS2005 via the ASP.NET development server all is well; my class 'Bar' that implements System.Web.IHttpHandlerFactory handles all incoming requests.
        
    When I run through IIS6 on Server 2003 all I get back is a 404.

    My complete web.config

    <?xml version="1.0"?>
    <configuration>
        <system.web>
            <httpHandlers>
                <add verb="*" path="*" type="Foo.Bar, Foo"/>
            </httpHandlers>
            <authentication mode="None"/>
        </system.web>
    </configuration>

    • I have set up the application in its own web site with 'read' and 'scripts only execute' permissions.
    • I deploy using the VS2005 'publish web site' functionality to a share on the server.
    • I set up a wild card application map to ASP.NET 2.0. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll on the server) and uncheck 'Verify that file exists'.


    I am really confused about why this isn't working especially since when I switch the wildcard application map to ASP.NET 1.1, I get the error "The format of the file 'Foo' is invalid".  This, I think, means that I have things set up correctly and dotNet 1.1 is barfing on the 2.0 format file.  I also know that the site is really there because if I remove the wild card application map and browse to a simple html file at the site's root, it displays correctly.

    My thoughts are
    1. I need to enable ASP.NET 2.0 on IIS like I needed to enable ASP.NET 1.1.  I believe this to be a low probability because the ASP.NET tab for the web site allows me to switch between 1.1.4322 and 2.0.50727.
    2. My security is not set up correctly.  I have given 'Everyone' full control to the folder on the server, so again this seems to be a low probability.
    3. The assembly with the handler needs to be strongly typed.

    Any help will be greatly appreciated.

     - Stuart
     

    Monday, March 12, 2007 5:05 PM

All replies

  • User-511554929 posted

    I've determined that my first thought was correct.  I needed to add ASP.NET 2.0.50727 as a web service extension to get things working.

     After this I had to give the 'NETWORK SERVICE' account modify permission to the 'Temporary ASP.NET Files' folder as well.

     I assume that this is 'best practice' since it makes sense that the service needs to modify its own temp files but I wanted to make sure this is the case.
     

    Monday, March 12, 2007 6:27 PM
  • User-823196590 posted

    Specifically what folder are you talking about?

    http://support.microsoft.com/kb/812614

    Tuesday, March 13, 2007 8:18 AM
  • User-511554929 posted

    The actual folder is: 

    %windir%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    Tuesday, March 13, 2007 12:02 PM
  • User-823196590 posted
    I'm not sure why the MSKB article does not mention that folder.
    Tuesday, March 13, 2007 2:39 PM