Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 [^]
Posted
Comments
ZurdoDev 29-Mar-12 8:19am    
What are the errors?

1 solution

Hi I have got the solution:

You need to just add/replace the following code at the end of your web.config:

XML
<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:
XML
<remove verb="*" path="*.asmx"/>
      <add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />


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.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900