Win2008/IIS7 中的 HTTP 处理程序
我们正在将网站从 Win2003/IIS6 迁移到 Win2008/IIS7。我们的 .NET 代码采用 WAP 形式,并带有已编译的二进制文件。我在 Win7/IIS7 机器上进行开发工作,因此必须尽早学习如何在这个较新的环境中设置 HTTP 处理程序。我在我的盒子上运行良好的是:
<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>
当我尝试调用 *.riv 处理程序时,我在新网站上得到的只是:
404 - 未找到文件或目录。
您正在查找的资源可能已被删除、名称已更改或暂时不可用。
好的。当写出这些问题时,你会看到有趣的事情。我们的服务器设置为集成模式并在 x64 系统上运行。因此,我将前提条件更改为:
preCondition="integratedMode,runtimeVersionv2.0,bitness64"
现在我得到这个:
500 - 内部服务器错误。
您要查找的资源有问题,无法显示。
关于我应该做什么、应该在哪里寻找有什么想法吗?
TIA
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对您的 *.riv 处理程序尝试以下操作:
它基于集成模式的 .aspx 处理程序。它不像经典模式那样作为 ISAPI 扩展运行。
Try the following for your *.riv handler:
That's based off of the .aspx handler for Integrated mode. It doesn't run as an ISAPI extension like in classic mode.