This is a migrated thread and some comments may be shown as answers.

VS2010 (.NET4) telerik 2010.1 + AjaxToolbox: client-side framework failed to load

3 Answers 191 Views
This is a migrated thread and some comments may be shown as answers.
Petter Forss
Top achievements
Rank 1
Petter Forss asked on 11 May 2010, 09:59 AM
I have followed all posts to this and partly it is solved for me.

I added MicrosoftAjax.js and MicrosoftAjaxWebForms.js in /scripts folder and referred to them in Radaxajxmanager:

     <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            <asp:ScriptReference Assembly="System.Web.Extensions" Name="MicrosoftAjax.js" Path="~/Scripts/MicrosoftAjax.js" />
            <asp:ScriptReference Assembly="System.Web.Extensions" Name="MicrosoftAjaxWebForms.js" Path="~/Scripts/MicrosoftAjaxWebForms.js" />

This workis in RELEASE-mode but the problems is still there in DEBUG-mode!?

What is missing or differs between debug and release...?

Best regards, Petter

3 Answers, 1 is accepted

Sort by
Petter Forss
Top achievements
Rank 1
answered on 11 May 2010, 10:06 AM

Hi, Fyi
The AjaxToolkit is 4.0 and my web config as below :

<?xml version="1.0"?>  
        <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/>  
        <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/>  
    <roleManager enabled="true" defaultProvider="AvancitSqlRoleProvider">  
        <add connectionStringName="ConnectionStringDebug" applicationName="krakan" name="AvancitSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    <compilation debug="true" targetFramework="4.0">  
                <add directoryName="CSharp"/>  
                <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>  
                <add assembly="System.Web.Extensions.Design, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
                <add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>  
                <add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>  
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>  
            <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>  
            <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>  
            <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>  
            <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>  
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>  
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>  
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>  
        <validation validateIntegratedModeConfiguration="false"/>  
        <modules runAllManagedModulesForAllRequests="true">  
            <remove name="RadUploadModule"/>  
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/>  
            <remove name="RadCompression"/>  
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>  
            <remove name="ChartImage_axd"/>  
            <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>  
            <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>  
            <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>  
            <remove name="Telerik_Web_UI_DialogHandler_aspx"/>  
            <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>  
            <remove name="Telerik_RadUploadProgressHandler_ashx"/>  
            <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>  
            <remove name="Telerik_Web_UI_WebResource_axd"/>  
            <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>  

Petter Forss
Top achievements
Rank 1
answered on 11 May 2010, 10:16 AM
The error can have many reasons (may exmaples out there...)

In debug mode the includescripts for Ajax looks like to be: MicrosoftAjax.debug.js; the error in scriptdebugger is:
<script src="Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script> 
<script type="text/javascript">  
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');

I got the MicrosoftAjax.js and MicrosoftAjaxWebForms.js from another telerik-post ; How do I get the corresponding to try with?

I tried to copy and rename the original ones and I do NOT get the error anymore. This is OK fro me, I will leave this like this a while.

Top achievements
Rank 1
answered on 03 Jun 2010, 02:03 AM
I am having the same trouble with this.
I upgraded to VS 2010, re-installed telerik 2010.1 so that I have a bin40 folder, downloaded AJAX toolkit 4.0 and referenced the DLL, and referenced telerik 4.0 from the bin40 folder. I then changed the project to use .net 4.0.
following these steps gets me the client side framework failed to load error.
I can not find the other post that explains why we need to use the MicrosoftAjax.js and MicrosoftAjaxWebForms.js files?
I searched and found these js files and referenced them in radajaxmanager.
After referencing them I get a different JS error:
a._events is undefined
Line 5
and then after that error:
Telerik is not defined
Line 147

NEVERMIND! i fixed it by using the upgrade wizard to get the latest version, then removed the js file references and now it works.
Asked by
Petter Forss
Top achievements
Rank 1
Answers by
Petter Forss
Top achievements
Rank 1
Top achievements
Rank 1
Share this question