Search code examples
webformsasp.net-ajaxajaxcontroltoolkitwindows-server-2012

AjaxcontrolToolkit does not work after deploy to the Windows Server


I had a problems of AjaxcontrolToolkit does not work after deploy to the Windows Server. The application with AjaxControlToolkit, its work at my machine, after deploy to Server , its diid not work. Here with my source code (Default.apsx)

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<cc1:ComboBox ID="ComboBox1" runat="server" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" DataSourceID="SqlDataSourceEng" DataTextField="R1" DataValueField="EngagementCode" MaxLength="0" AutoPostBack="True" class="WindowsStyle" Width="400px" OnSelectedIndexChanged="ComboBox1_SelectedIndexChanged" AppendDataBoundItems="True" >
                         <asp:ListItem Value="0" Text="" Selected="True"></asp:ListItem>
                     </cc1:ComboBox>

Inside the Web.config

 <controls>

        <add tagPrefix="cc1" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />

      </controls>

Here with the result before deploy to the Windows Server 2012. enter image description here

Here with the result after deploy to the Windows Server 2012. enter image description here

Anyone facing the same issue?


Solution

  • I use EnableCdn in ScriptManager

      <asp:ScriptManager ID="ScriptManager2" runat="server" EnablePartialRendering="true" EnableCdn="true"></asp:ScriptManager>
    

    and

    the section

     <script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/WebForms.js" type="text/javascript"></script>
        <script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/MicrosoftAjaxWebForms.js" type="text/javascript"></script>
        <script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/MicrosoftAjax.debug.js" type="text/javascript"></script>
        <script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/MicrosoftAjaxTimer.debug.js" type="text/javascript"></script>
    
        <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.0.js"></script>
        <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.0.min.js"></script>
    

    References: https://learn.microsoft.com/en-us/aspnet/ajax/cdn/overview#ajaxmicrosoftcom_renamed_to_ajaxaspnetcdncom_18