title: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts Error
body: <p>I'm experiencing a AjaxToolkit Calendar display error in production only. Locally when debugging, this problem does not exist and the calendar datepicker works perfectly. All of the other posts revolve around this Toolkit not working at all. I'm concerned with why this works in test but not production since I can't find a reference anywhere in my code that uses ASP.NET ScriptManager.</p>
  
  <p>The following is on "Site.Master"</p>
  
  <pre><code>&lt;ajaxToolKit:ToolkitScriptManager runat="server"&gt;
      &lt;Scripts&gt;
          &lt;%--Framework Scripts--%&gt;            
          &lt;%--&lt;asp:ScriptReference Name="jquery" /&gt;--%&gt;
          &lt;%--&lt;asp:ScriptReference Name="jquery.ui.combined" /&gt;--%&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/WebForms.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/WebUIValidation.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/MenuStandards.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/GridView.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/DetailsView.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/TreeView.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/WebParts.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/WebForms/Focus.js" /&gt;
          &lt;asp:ScriptReference Name="WebFormsBundle" /&gt;
          &lt;%--Site Scripts--%&gt;
  
      &lt;/Scripts&gt;
  &lt;/ajaxToolKit:ToolkitScriptManager&gt;
  </code></pre>
  
  <p>This is the page that uses the Calendar function and has Site.Master as its MasterPageFile</p>
  
  <pre><code>&lt;asp:Label ID="DateRangeLabel" runat ="server" Text="Date Range: "&gt;&lt;/asp:Label&gt;
  &lt;asp:TextBox ID="DateFrom" runat="server" Width="95px"&gt;&lt;/asp:TextBox&gt;
  &lt;ajaxtoolkit:calendarextender ID="Calendarextender" runat="server" TargetControlID="DateFrom" PopupPosition="BottomLeft" Format="MM/dd/yyyy"&gt;&lt;/ajaxtoolkit:calendarextender&gt;
  &lt;asp:TextBox ID="DateTo" runat="server" Width="95px"&gt;&lt;/asp:TextBox&gt;
  &lt;ajaxtoolkit:calendarextender ID="Calendarextender1" runat="server" TargetControlID="DateTo" PopupPosition="BottomLeft" Format="MM/dd/yyyy"&gt;&lt;/ajaxtoolkit:calendarextender&gt;
  </code></pre>
  
  <p>This is part of my Web.config file</p>
  
  <pre><code>&lt;controls&gt;
      &lt;add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /&gt;        
      &lt;add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/&gt;
  &lt;/controls&gt;
  </code></pre>
  
  <p>This is the error that is generated in production:</p>
  
  <pre><code>Uncaught Error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.
  
  Uncaught TypeError: undefined is not a function  MicrosoftAjax.js:6
  </code></pre>