views:

92

answers:

1

We are migrating our web sites from Win2003/IIS6 to Win2008/IIS7. Our .NET code is in a WAP form with compiled binaries. I do dev work on a Win7/IIS7 box so had to learn early how to set up HTTP Handlers in this newer environment. What I have that has worked fine on my box is:

  <system.webServer>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated" />
            <remove name="ScriptHandlerFactory" />
            <remove name="ScriptHandlerFactoryAppServices" />
            <remove name="ScriptResource" />
            <add name="RivWorks" path="*.riv" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
            <add name="RivWorks2" path="*.riv2" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>

All I am getting on the new web site when I try to call into the *.riv handler is:

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

OK. You see interesting things when writing out these questions. Our server is setup in integrated mode and runs on a x64 system. So, I changed the precondition clause to:

preCondition="integratedMode,runtimeVersionv2.0,bitness64"

Now I get this instead:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Any ideas of what I should be doing, where I should be looking?

TIA

A: 

Try the following for your *.riv handler:

<add name="RivWorks-Integrated" path="*.riv" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" />

That's based off of the .aspx handler for Integrated mode. It doesn't run as an ISAPI extension like in classic mode.

Scott Forsyth
so, what you are saying is I should drop what I have and recreate with an integrated module (or something like that)?
Keith Barrows
No, it's easier than that. Just replace your first <add name..." line with my example above. That should do the trick. And then do the same for riv2.
Scott Forsyth
I am getting a more complete response but still a 404 in the end.
Keith Barrows
Finally got it working. <add name="RivWorks-Deliver-Video-Handler" path="*.riv" verb="*" type="RivWorks.Web.DeliverVideo" resourceType="Unspecified" preCondition="integratedMode" /> did the trick.
Keith Barrows
Great. That's essentially the same except that it uses your own class instead of the normal PageHandlerFactory.
Scott Forsyth