Ajax Client Side Framework Failed to Load in IIS7

Today, I was deploying a website for one of my clients. The website used numerous AJAX features and was built using .Net Version 4.0. The site deployed fine but when attempting to perform an AJAX feature, it failed. After looking through the error in Firebug, I got the following 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 the handlers section:

  1. <add modules="IsapiModule" name="AXD-ISAPI-4.0-64" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness64"  
  2.     resourcetype="Unspecified" scriptprocessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"  
  3.     verb="*">  
  4. <add modules="IsapiModule" name="AXD-ISAPI-4.0" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness32" resourcetype="Unspecified"  
  5. scriptprocessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" verb="*"></add></add>  
Now, the section looks as in the following:
  1. <handlers>  
  2. <add modules="IsapiModule" name="AXD-ISAPI-4.0-64" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness64" resourcetype="Unspecified"  
  3. scriptprocessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" verb="*">  
  4. <add modules="IsapiModule" name="AXD-ISAPI-4.0" path="*.axd" precondition="classicMode,runtimeVersionv4.0,bitness32" resourcetype="Unspecified"  
  5. scriptprocessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" verb="*">  
  6. <add name="ScriptResource" path="ScriptResource.axd" precondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral,  
  7. PublicKeyToken=31bf3856ad364e35" verb="GET,HEAD">  
  8. <add name="ScriptHandlerFactoryAppServices" path="*_AppService.axd" precondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0,  
  9. Culture=neutralPublicKeyToken=31BF3856AD364E35" verb="*"></add></add></add></add></handlers>  
Hope you all find the above tip useful.

 


Similar Articles
Rebin Infotech
Think. Innovate. Grow.