ASP.NET Ajax client-side framework failed to load. when put the ScriptManager on a blank page

this solution works for me:

The error on client was:

SCRIPT5022: ASP.NET Ajax client-side framework failed to load.

SCRIPT5009: ‘Sys’ is undefined

After many time to mining the websites, and more solutions, i solve the problem:

the solution for .NET 4.0 is:

Set EnableCdn property of script manager to true, Like this:

<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true">

Next Solution and Better Solution is:

add this handler to your web.config

  <system.webServer>
    <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>
  </system.webServer>

Leave a Comment