6
Vote

One more time: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts.

description

My ajaxcontroltoolkit was working fine until I selected "convert to web application" on the Solution Explorer. I now get the "Ajax 4.0 scripts" message with my project, and with both of my backups. I created a new project, same message. I uninstalled and reinstalled the toolkit, nothing. I even uninstalled and reinstalled Visual Studio Express 2012 for Web. No change. Here's my code from my master page. As I said, it's been working fine.
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" EnablePageMethods="true"  runat="server">

        <Scripts>
            <%--Framework scripts--%>
            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="jquery.ui.combined" />
            <asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" />
            <asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" />
            <asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" />
            <asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" />
            <asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" />
            <asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" />
            <asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" />
            <asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" />
            <asp:ScriptReference Name="WebFormsBundle" />
            <%--Site scripts--%>
        </Scripts>
    </ajaxToolkit:ToolkitScriptManager>
tagprefix from web.config is
    <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />

comments

pdickerson wrote Jan 24, 2013 at 10:38 AM

System restore didn't work, either. I backed up the project and restored, but as soon as I loaded the project back in, the problem was back. I'm really at a loss as to how to proceed here.

pdickerson wrote Jan 29, 2013 at 2:30 AM

I've installed the January 2013 version of the toolkit, and changed the tagprefix to asp rather than ajaxtoolkit. Makes no difference. Same message.

muslem wrote Jan 31, 2013 at 4:03 AM

I encountered the same issue. New released ajax control toolkit have compatible bug with existing Visual Studio 2012 asp.net web forms project template on .NET Framework 4.5.

I am using CascadingDropDown control and have replaced asp.net scriptmanager with toolkit script manager:

Web.config:
<add tagPrefix="ajax" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>

ASP.NET Page:
<ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajax:ToolkitScriptManager>

Here is the error message:

0x800a139e - JavaScript Runtime 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.

Gint wrote Mar 21, 2013 at 8:56 PM

I have the same issue. This is not "Low impact". Using Visual Studio 2012. I followed http://stephenwalther.com/archive/2012/09/20/september-2012-release-of-the-ajax-control-toolkit.aspx exactly.

Gint wrote Mar 21, 2013 at 11:14 PM

More details: For 4.5, the September 2012 release of the toolkit works. The January 2013 does not. The error message described is very easy to reproduce. Avoid the January 2013 release if you are using .NET 4.5.

Duality wrote Mar 22, 2013 at 3:11 PM

I figured out what the problem I was having was, here's my step by step notes on it:
http://timscyclingblog.wordpress.com/2013/03/22/ajaxcontroltoolkit-version-7-0123-with-net-4-5/

Essentially the solution for me is to remove Microsoft.AspNet.ScriptManager.MSAjax 4.5.6.

Roger_Beall wrote May 10, 2013 at 9:20 PM

This is still an issue with the April 30 release and is preventing use.

Regeter wrote Oct 7, 2013 at 4:36 PM

Whenever I have this issue it's usually caused by the file Microsoft.AspNet.ScriptManager.MSAjax in \bin

caesar2010 wrote Jan 9 at 3:25 PM

@Regeter

Many thanks.

I deleted all \bin content and rebuilt the project.
I'll try this whenever some strange behaviour arise....