locked
UpdatePanel dosent work after publish RRS feed

  • Question

  • User2001227443 posted

    I have website (C#, ASP.NET, .NET 4.0) and using ASP.NET Ajax (Update Panel) and jQuery Ajax.

    On client side, everything is ok and there is no any error...

    After publish the website on the host, jQuery ajax work fine but update panel dosent work and make postback and page refresh!

    the .NET setting of host is .NET 4.0 too.

    i dont know where is the problem and why?!

    Thank you all

    Wednesday, November 27, 2013 10:19 AM

Answers

  • User2001227443 posted

    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 checking more solution, 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 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>
    

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 1, 2013 10:37 AM

All replies

  • User555306248 posted

    Hi,

    Please using ToolkitScriptManager instead of ScriptManager.

    And also make sure you install the correct version of the AjaxControlToolkit:

    Version 3.0.20229 2008-02-29 release of the AJAX Control Toolkit targets the official release of .NET Framework 3.5 and Visual Studio 2008.

    Version 1.0.20229 You can also download the Toolkit for .NET Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005.

    Version 3.0.40412

    April 12, 2010 release of the AJAX Control Toolkit for ASP.NET 3.5 Service Pack 1 and Visual Studio 2008 SP1.

    Version 4.1.51116.0

    Nov 16 2011 release of the AJAX Control Toolkit for ASP.NET 4.0 and Visual Studio 2010

    Then you could add the Ajax Control Toolkit to the VS Toolbox step by step at:http://www.asp.net/ajaxlibrary/act.ashx

    http://forums.asp.net/t/1711903.aspx

    Wednesday, November 27, 2013 11:06 PM
  • User2001227443 posted

    i got this error on explorer:

    ASP.NET Ajax client-side framework failed to load

    Sunday, December 1, 2013 8:34 AM
  • User2001227443 posted

    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 checking more solution, 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 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>
    

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 1, 2013 10:37 AM