I am developing my own HTTP handler. Using the new web.config section <httphandlers>for ASP.NET 4.0 and IIS7, this works fine on my development machine.
However, when I upload the code to my shared hosting account, I get a 500 server error. I called my hosting company and they said that the server reports an error related to setting the web.config parameter, which does not apply to the integrated conveyor mode.
When he switched IIS from integrated to classic mode, the home page loads fine, but my routed pages report a 403 server error.
I'm sure I need integrated mode for the partition to <httphandlers>work, but I'm definitely not the IIS / admin guy. Does anyone know what could be the problem or what can I try next?
EDIT: The bulk of my updated web.config:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
[...]
</connectionStrings>
<appSettings>
[...]
</appSettings>
<system.web>
<httpHandlers>
<add verb="*" path="*.zip" type="BlackBelt.ZipHttpHandler"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.0"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<handlers>
<add verb="*" path="BlackBelt.ZipHttpHandler" name="BlackBelt.ZipHttpHandler" type="BlackBelt.ZipHttpHandler"/>
</handlers>
<rewrite>
<rules>
<clear/>
<rule name="WWW Rewrite" enabled="true">
<match url="(.*)"/>
<conditions>
<add input="{HTTP_HOST}" negate="true" pattern="^www\.([.a-zA-Z0-9]+)$"/>
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" appendQueryString="true" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
source
share