Ajax.Dll在带有IIS7的Server 2008上不起作用. [英] Ajax.Dll is not working on Server 2008 with IIS7.
问题描述
大家好,
最近,我们使用IIS7在Server 2008环境上迁移了网站.
从那时起,页面上的Ajax方法开始引发错误.我试图搜索导致此问题的原因,但找不到任何可行的解决方案.
可以任一个.帮助我解决这个问题.
我正在页面上将Ajax.Dll用于Ajax方法.
我已经尝试了下面给出的链接中提到的解决方案:
AjaxPro在iis7中不起作用 [
Hi all,
Recently we shifted our website on Server 2008 environment with IIS7.
And since then Ajax Methods on page started to throw errors. I tried to search the cause for this problem, but could not find any working solutions.
Can any one plz. help me on this issue.
I am using the Ajax.Dll for the Ajax Methods on my page.
I have tried the solution as mentioned in the link given below:
AjaxPro does not work in iis7 [^]
推荐答案
我得到了解决方案:
您只需要在web.config的末尾添加/替换以下代码:
Hi I have got the solution:
You need to just add/replace the following code at the end of your web.config:
<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" />
<remove verb="*" path="*.asmx" />
<add verb="POST,GET" 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>
结论:以前我添加了以下代码:
Conclusion : Previously I was adding the following code:
<remove verb="*" path="*.asmx"/>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
但是在服务器上< add>标签必须包含name属性,因此在提供了name标签之后,我的问题已解决,非常感谢Mike Volodarsky( ^ ]) .
But On server <add> tag must contain the name attribute, therefore after providing the name tag my problem was resolved, and great thanks for Mike Volodarsky (http://learn.iis.net/page.aspx/381/aspnet-20-breaking-changes-on-iis/[^]) for such informative article.
这篇关于Ajax.Dll在带有IIS7的Server 2008上不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!