locked
ASP.NET Ajax client-side framework failed to load. RRS feed

  • Question

  • User-838274278 posted

    Hi All,

    We are facing problem on prod server "ASP.NET Ajax client-side framework failed to load." server is windows server 2016, IIS 10, app pool is 4.0

    Tuesday, December 3, 2019 1:13 PM

All replies

  • User288213138 posted

    Hi aamodjoshi,

    ASP.NET Ajax client-side framework failed to load

    Can you post more information about this error? Such as your application scenario or your code. etc.

    About this error you can refer to this link:https://stackoverflow.com/a/3728851

    The reason is the path of the javascript generated by the scriptmanager changes when the URL Routing module is used.

    The solution is tell the routing API to not route the files with "axd" extension.

    Best regards,

    Sam

    Wednesday, December 4, 2019 7:03 AM
  • User-1780421697 posted

    One of quick solution is 

    add the <handlers> section as shown below in your web.config within <system.webServer> and this will fix the problem.
    
    <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=3.5.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=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </handlers>
    </system.webServer>

    Wednesday, December 4, 2019 1:50 PM
  • User-1780421697 posted

    Solution in .Net 4.0 is 

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

    Another possible solution is:

    <location path="ScriptResource.axd">
       <system.web>
          <authorization>
             <allow users="*"/>
          </authorization>
       </system.web>
    </location>

    Wednesday, December 4, 2019 1:51 PM
  • User-838274278 posted

    We have installed visual studio on server when we opened website in vs and run it from vs (local host) then Ajax is working but if when tried to run it through domain (e.g. xyz.com) then its not working

    Thursday, December 5, 2019 10:27 AM
  • User288213138 posted

    Hi aamodioshi,

    We have installed visual studio on server when we opened website in vs and run it from vs (local host) then Ajax is working but if when tried to run it through domain (e.g. xyz.com) then its not working

    Which ajax control do you use? please show me your code, i need it to reproduce your problem.

    Here are a few similar problems and solutions for your reference.

    https://stackoverflow.com/questions/8638436/asp-net-ajax-client-side-framework-failed-to-load

    https://stackoverflow.com/questions/11288796/asp-net-ajax-client-side-framework-failed-to-load-when-put-the-scriptmanager-on

    Best regards,

    Sam

    Friday, December 6, 2019 7:25 AM