Today, I was deploying a website for one of my clients that used a lot of AJAX features and was built using .Net Version4.0. The site deployed fine but when trying to perform a AJAX feature, it failed. After looking through the error in Firebug, got the below error:

Ajax client-side framework failed to load in IIS7 using ASP.Net 4.0

After doing a lot of research, I was able to resolve the issue by adding the following to the web.config file under handlers section.

<add modules="IsapiModule" name="AXD-ISAPI-4.0-64" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness64" resourcetype="Unspecified" scriptprocessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" verb="*">

<add modules="IsapiModule" name="AXD-ISAPI-4.0" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness32" resourcetype="Unspecified" scriptprocessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" verb="*"></add>

</add>

Now, the section looks as below:

<handlers>

<add modules="IsapiModule" name="AXD-ISAPI-4.0-64" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness64" resourcetype="Unspecified" scriptprocessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" verb="*">

<add modules="IsapiModule" name="AXD-ISAPI-4.0" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness32" resourcetype="Unspecified" scriptprocessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" verb="*">

<add name="ScriptResource" path="ScriptResource.axd" precondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" verb="GET,HEAD">

<add name="ScriptHandlerFactoryAppServices" path="*_AppService.axd" precondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" verb="*"></add>

</add>

</add>

</add>

</handlers>

Hope you all find the above tip useful.