ASP.NET Ajax client-side framework failed to load OR ‘Sys’ is undefined

I had an ASP.Net 4 website in Web Forms it was working fine on local machine and on one of our Windows 2008 R2 server which had Framework 4.0. But when we moved to production machine which also had Windows 2008 R2 server, website started to generate Ajax client-side framework failed to load error on pages which had UpdatePanels. After searching for some time, found the solution. This was actually caused by the fact that the website had an application pool set to .NET 4.0 but the [Handler Mappings] for the *.axd files where not registered. I had to add following handlers in my Web.Config file.

<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.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=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>

After adding this its working perfectly. But I am still not sure, why these handlers are already added in our testing server and not on production.

Leave a Comment.


Time limit is exhausted. Please reload CAPTCHA.