Win2008/IIS7 中的 HTTP 处理程序

发布于 2024-08-31 03:41:00 字数 2262 浏览 4 评论 0原文

我们正在将网站从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

糖果控 2024-09-07 03:41:00

对您的 *.riv 处理程序尝试以下操作:

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

它基于集成模式的 .aspx 处理程序。它不像经典模式那样作为 ISAPI 扩展运行。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文