处理程序在IIS7.5集成管道上返回404错误 [英] Handlers returns 404 error on IIS7.5 integrated pipeline

查看:133
本文介绍了处理程序在IIS7.5集成管道上返回404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<httpHandlers>
  <add path="ajaxpro/*.ashx" verb="POST,GET" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2" />
  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
  <remove verb="*" path="*.asmx" />
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpHandlers>

我在集成模式下遇到iis7.5的问题。当我在经典模式处理程序中使用它时,上面提到的工作正常,但如果我切换到集成管道 - 所有应该处理的请求返回404错误。为什么?

I have a problem with iis7.5 in integrated mode. When I use it in classic mode handlers that presented above work fine, but if I switch to the integrated pipeline - all requests that should be handled return 404 error. Why?

推荐答案

我可能会离这里很远,因为我可能会远离IIS专家,但是我遇到了你的问题,因为我在集成模式下遇到IIS7问题。我注意到的一件事是你正在使用httpHandlers部分,它位于system.web中。但是,我认为对于集成模式,您需要使用system.webServer部分:

I could be miles off here because I'm as far from an IIS expert as it's possible to be, but I came across your question since I too am having trouble with IIS7 in integrated mode. One thing I notice is that you're using the httpHandlers section, which sits in system.web. However, I think for integrated mode you need to use the system.webServer section:

<system.webServer>
   <handlers>
      <add... >
   </handlers>
</system.webServer>

如果我错了,希望有人知道他们在谈论什么会纠正我。

Hopefully someone who knows what they're talking about will correct me if I'm wrong.

这篇关于处理程序在IIS7.5集成管道上返回404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆