2

ajax dll 在 IIS 6 中工作,但在 IIS 7 中不工作。ajax dll 需要在服务器中安装任何框架吗?

system.web 标签中的 web 配置

<assemblies>
<add assembly="System.Web.Extensions, Version=2.0.50727.1433, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
<httpHandlers>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
</httpHandlers>
4

2 回答 2

5
 <system.webServer>    
 <validation validateIntegratedModeConfiguration="false" />
  <modules>
    <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </modules>
  <handlers>
    <remove name="WebServiceHandlerFactory-Integrated" />

    <add verb="POST,GET" name="Ajax" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </handlers>
  </system.webServer>


   <system.web>
  <httpHandlers>
        <add verb="POST,GET"  path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>
    </httpHandlers>
  </system.web>
于 2012-10-01T06:16:37.323 回答
1

也许您在 IIS 7 中使用集成 .NET 模式,那么 httpHanders 配置需要更改。参考这个

于 2012-09-19T06:19:58.837 回答