« Evolution, Alberta and Headdesk Denyse - Part II | Evolution, Alberta and Headdesk Denyse - Part I » |
We had one big hiccup moving from IIS 6.0 to the 7.0 version.
In the Web.Config, IIS 7.0 no longer likes to have an httpHandlers section. We had:
<system.web>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false"/>
</httpHandlers>
</system.web>
A very good guide to IIS 7.0 migration issues is located here, and we used that to help guide our transition, though it missed a couple of issues.
We had to put in a <system.webServer> section. We moved the <httpHandlers> code into there, but instead of <httpHandlers>, the section should now be called <handlers>.
One thing that is not mentioned is that your handlers should have names now, so we tried changing things like this:
<system.webServer>
<handlers>
<remove name="asmx" verb="*" path="*.asmx" />
<add name="asmx" verb="*" path="*.asmx" ... />
<add name="scriptResource" verb="GET,HEAD" ... />
</handlers>
</system.webServer>
Trying the web server yet again, we ran into another error, "unrecognized attribute 'verb'" on the "remove" line.
Well, it turns out that the remove syntax has changed, such that you only need the name. We had been fooled by the IIS 6.0 similarity between the add and remove syntax and thinking it still applied.
Changing the remove line to just:
<remove name="asmx" />
...worked just fine.
This did not come up in our searches for "unrecognized attribute "verb", so hopefully, this saves someone else a bit of time.