AJAX Control Toolkit Compatability

Thread is closed for posting
115 posts, 0 answers
  1. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 13 May 2010 Link to this post

    Hello Dennis,

    Does replacing the RadScriptManager with ASP:Scriptmanager results in the same error?

    Greetings,
    Iana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  2. Dennis Chipps
    Dennis Chipps avatar
    11 posts
    Member since:
    Feb 2009

    Posted 13 May 2010 Link to this post

    toolkitscript manager does not give me any error, but the ajax script manager gives me the following error.

    Microsoft JScript 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.
  3. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 13 May 2010 Link to this post

    Hi Dennis,

    What is the ASP:ScriptManager ScriptMode - Debug or Release? And does adding the script references suggested perviously makes any difference?

    Greetings,
    Iana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  4. Dennis Chipps
    Dennis Chipps avatar
    11 posts
    Member since:
    Feb 2009

    Posted 13 May 2010 Link to this post

    My project is in debug.  Adding the script references to the rad script manager changes the error to

    <script src="/AjaxControlToolkitAndRadAjax/WebResource.axd?d=NuKB0eF33K4Rz7XeNcpQxg2&amp;t=634092023486387752"type="text/javascript"></script>

    <script src="Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>

    <script type="text/javascript">

    //<![CDATA[

    if (typeof(Sys) === 'undefined'throw new Error('ASP.NET Ajax client-side framework failed to load.');

    //]]>

    <

  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 14 May 2010 Link to this post

    Hello Dennis,

    So it seems that the error persists when having ASP.NET and AjaxControlToolkit controls on the page only. If yes, I assume we rather should look for the source of the problem in the .NET 4.0 Framework.

    Regards,
    Iana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Mike Fleming
    Mike Fleming avatar
    4 posts
    Member since:
    Nov 2009

    Posted 21 May 2010 Link to this post

    I am having similar issues while trying to load either the Microsoft ScriptManager or Telerik's.  If I disable my Page Routes (Routing) the problem goes away.
    Is there a route-map that we can create which will allow the .axd resource files to load properly?

    UPDATE:
    I was finally able to get this all working correctly.  I did need the lines (below) in web.config ... which I already had:
     <system.webServer> 
            <validation validateIntegratedModeConfiguration="false"/> 
            <modules runAllManagedModulesForAllRequests="true"
            </modules> 

    The missing item was that I needed to add the below route map to Ignore the resource files:
                routes.Ignore("{resource}.axd/{*pathInfo}"); 
     




  7. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 22 May 2010 Link to this post

    Hi, one of these problems has nothing to do with telerik (but also prevents the RadScriptManager from working): you need to use the ToolkitScriptManager instead of the ScriptManager if you are using the newest ACT together with the newest ASP.NET 4. I think the ACT team needs to get its act together and use the same js libs that ASP.NET 4 does. Open source is fine, but only if done properly.... Microsoft needs to be sure the quality of this Microsft-near open source is acceptable...

    R

  8. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 22 May 2010 Link to this post

    Routing: I can confirm that it will work with Telerik, ASP.NET 4, ACT -- all newest versions. See my posts abov for the combination I use. Also, be sure you have this in your web. config ( you can take a look at the web.config generated for any new ASP.NET MVC2 project).

        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules runAllManagedModulesForAllRequests="true">
            </modules>

    ...
    R



  9. Rowland O'Connor
    Rowland O'Connor avatar
    14 posts
    Member since:
    Mar 2005

    Posted 27 May 2010 Link to this post

    Congratulations to MS for releasing yet another half tested software release in the shape of .NET 4.0. 2 days migrating an app from 3.5 and counting. Not sure why everything MS seems to be so painful these days but that's a story for another day:)

    Anyway, as part of my painful experience, I thought I'd share a fix that works for me in the hope that it can save someone a few hours of time.
     
     <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"
            <CdnSettings TelerikCdn="Disabled" /> 
            <Scripts> 
                <asp:ScriptReference Name="MicrosoftAjax.js" Path="~/js/MicrosoftAjax.js" /> 
                <asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Path="~/js/MicrosoftAjaxWebForms.js" /> 
            </Scripts> 
        </telerik:RadScriptManager> 
    The .js files that you need can be found in an earlier post.

    Now for the really crap (i.e. hack to work around some unexplained RadScriptManger behaviour) bit essential to getting it to work:

    Not only do you need files MicrosoftAjax.js and MicrosoftAjaxWebForms.js but you need to create copies of each of these file like this:
    • MicrosoftAjax.debug.js
    • MicrosoftAjaxWebForms.debug.js

    There are obviously errors in versioning between Telerik and MS .js libs. Also, I have no idea why RadScriptManager appends .debug. to files.

    Obviously, this is a dirty hack and not a long term solution.

    UPDATE
    Here's another related little gem that's burnt several hours today. Again, I hope someone benefits from my pain.

    I compile a web application (using the .js files above) in the UK and deploy it on a server in the US.

    WebResource.axd (generated by RadScriptManager with CombineScripts=true) causes .NET 4 to generate this error:

    System.ArgumentOutOfRangeException

    Specified argument was out of the range of valid values. Parameter name: utcDate

    This error is generated because the .js files, on compilation into an installable .msi are time stamped with UK time (not sure if it's GMT or UTC or even BST). On installation onto the US server, the .js files have a date that is ~ 7 hours in the future.

    .NET 4 doesn't like files with a future date so it barfs WebResource.axd (great huh?) More info here.


    I'm trying ScriptManager and ToolKitScriptManager next.

    UPDATE #2
    More time spent fault finding others code. Telerik - can I at least have some points in my account please?

    The System.ArgumentOutOfRangeException (file datetime) weirdness turns out to be a bug between MS Web Deployment Projects and Setup and Deployment resulting in file dates not being copied over to the installation MSI. As a work around, I'm having to set my UK dev machine to the same time zone as production server.

    Now onto Telerik issues. RadScriptManager (using the MS Ajax library hacks as described above), ScriptManager and ToolkitScriptManager result in JavaScript errors with RadAjaxManager. Here are the errors:

    i.get_postBackElement() is undefined
    if(Array.contains(c,i.get_postBackElement().id)){this._isRequestInProgress=true; ..

    This bug is present in all .NET 4 builds that I've tried up to and including internal build 2010_1_526.

    In summary, you can implement either (RadScriptManager + RadAjax) OR AjaxControlToolkit but not both.

  10. T. Tsonev
    Admin
    T. Tsonev avatar
    2774 posts

    Posted 28 May 2010 Link to this post

    Hi Rowland O'Connor,

    Thank you for taking the time to investigate this problems. We're having hard time with the Toolkit too and any information is welcome. Hefty amount of Telerik points coming your way :)

    The problem with RadAjax should be fixed. Are you using the script files from the latest AJAX Toolkit?

    Sincerely yours,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  11. Rowland O'Connor
    Rowland O'Connor avatar
    14 posts
    Member since:
    Mar 2005

    Posted 28 May 2010 Link to this post

    Hi Tsvetomir,

    I tried using the AJAX files in the previous post.

    For the time being, I've pulled out AjaxControl toolkit and reverted to RadScriptManager + RadAjax. Lucky for me, it's only used on a rarely used admin form so I can live without AjaxControl toolkit in the short term.

    Regards,

    Rowland
  12. mesut
    mesut avatar
    2 posts
    Member since:
    Aug 2005

    Posted 02 Jun 2010 Link to this post

    Hello,

    We have the same problem. The problem creates too much trouble in our internal company control panel.

    What is the solution? 
  13. T. Tsonev
    Admin
    T. Tsonev avatar
    2774 posts

    Posted 04 Jun 2010 Link to this post

    Hi Mesut,

    I'm sending you a sample ASP.NET 4.0 site with RadScriptManager and the Ajax Toolkit. See the ExternalScripts.aspx page. The same approach can be used in 3.5 as well.

    I hope this helps.

    Sincerely yours,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  14. Rowland O'Connor
    Rowland O'Connor avatar
    14 posts
    Member since:
    Mar 2005

    Posted 04 Jun 2010 Link to this post

    Thanks Tsvetomir.

    Is this now working with RadAjaxManager too?


  15. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 04 Jun 2010 Link to this post

    Hello Rowland,

    Any issues concerning AJAX Toolkit 4.0 compatibility with RadAjax for ASP.NET AJAX should be addressed in the latest official release 2010.1.519 of the suite (Q1 2010 SP2). Please upgrade to this version of the bundle and let us know whether everything is OK.

    Best regards,
    Sebastian
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  16. Rowland O'Connor
    Rowland O'Connor avatar
    14 posts
    Member since:
    Mar 2005

    Posted 04 Jun 2010 Link to this post

    Hi Sebastian,

    I'm afraid that those issues are not addressed in 2010.1.519.

    Please see my previous post.
  17. mesut
    mesut avatar
    2 posts
    Member since:
    Aug 2005

    Posted 05 Jun 2010 Link to this post

    Hi Sebastian,

    We are using telerik controls  in million visit web site admin panel. Right now, we have huge problems. We start to disable ajaxtoolkit in pages but our admin system has more than 400 pages. 

    Our apps pool are set asp 4.0. 
    We are using 4.1.40412.2 dll AjaxControlToolkit.Binary.NET4 . 
    Telerik 2010.1.415.40

    We still have the problem. We try to add  your solution but we need to use AjaxControlToolkit.Binary.NET4 but in our solution you use System.Web.Extensions, Version=3.5.0.0


    To guarantee we us,   

      <telerik:RadScriptManager ID="ToolkitScriptManager1" runat="server">
        <Scripts>
          <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            Name="MicrosoftAjax.js" Path="http://ajax.microsoft.com/ajax/4.0/1/MicrosoftAjax.js" />
          <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            Name="MicrosoftAjaxWebForms.js" Path="http://ajax.microsoft.com/ajax/4.0/1/MicrosoftAjaxWebForms.js" />
        </Scripts>
      </telerik:RadScriptManager>

    We still have problem.


  18. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 05 Jun 2010 Link to this post

    Hi, we've got the constellation you mention working on a large website with many many Telerik+AjaxControlToolkit (mixed) pages where we use a large array of functionality from both Telerik And the ACT, the only difference is that we use the .NET 3.5 ACT binary, but the whole site is built as ASP.NET 4.0...:

    Actually, the changes that we made to make this work are  mentioned in my post above, but I'll summarize again here. Also, it is now working together with the Telerik CDN:

    * IIS7.5 AppPool v4.0, Integrated.
    * ACT: 3.5.40412 but we compile everything against the .NET Framework 4.
    Here is an excerpt from the web.config:
            <compilation debug="true" targetFramework="4.0">
                <assemblies>
                    <add assembly="Microsoft.SqlServer.Types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
                    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                    <add assembly="Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                    <add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                    <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                    <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                    <add assembly="System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies>
            </compilation>




    We use: Telerik 2010.1.519.40

    And the following ScriptManager configuration:

        <telerik:RadScriptManager runat="server" ID="ScriptManager"
            EnablePartialRendering="true"    
            OnAsyncPostBackError="ScriptManager_AsyncPBErrorHandler"
            EnableScriptGlobalization="true"  
            RoleService-LoadRoles="true"   
            ScriptMode="Auto"   
            EnableCdn="true" CdnSettings-TelerikCdn="Enabled"  
            EnablePageMethods="true" EnableScriptCombine="true" >   
            <Scripts>   
                <asp:ScriptReference Name="MicrosoftAjax.js" Path="/jsc/MicrosoftAjax.js" />   
                <asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Path="/jsc/MicrosoftAjaxWebForms.js" />   
                <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" />   
            </Scripts>   
        </telerik:RadScriptManager>

    Where the /jsc/MicrosoftAjax.js and the /jsc/MicrosoftAjaxWebForms.js are those from the AjaxControlToolkit sources NOT the ones from the ASP.NET 4.0 CDN. The last two lines (Core.js and jQuery.js) are for another IE8 workaround that we require, so they are probably insignificant for this scenario, but who knows...

    Works like a charm, but I'm assuming that the AjaxControlToolkit team is getting its act together and will soon move to the "real" ASP.NET 4 javascript libs instead of expecting everyone to use their hack -- absurd!

    Also, I haven't tried any other "mixtures" in recent weeks. But since Telerik has a new release, there may be other constellations that work now. We can't just "dump" the ACT, so we appreciate the support from Telerik here.

    Anyway, I hope this helps.

    Richard




  19. JH
    JH avatar
    25 posts
    Member since:
    Jan 2010

    Posted 07 Jun 2010 Link to this post

    Thanks a lot Richard for the temporary solution!
    I really hope that this get fixed in the next ACT build. Will anyone keep us updated on this issue?
  20. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 08 Jun 2010 Link to this post

    I'm glad I finally found this thread.  I have exactly the same problem, though I am likely complicating matters by running the RC of Framework 4.0 ;)

    Anyway, after using Richard's workaround, I still get the same error that Dennis reported:

    <script src="js/MicrosoftAjax.debug.js" type="text/javascript"></script> 
    <script type="text/javascript">  
    //<![CDATA[
    if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
    //]]> 
    < 

    I will try tomorrow to get a copy of the relevant .js files from the sources as I just grabbed them from one of the attached projects on this thread they may not be the right ones?

    Craig
  21. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 08 Jun 2010 Link to this post

    Hi Craig,

    Are you sure you have the precise versions I described, and that it is finding your script /js/MicrosoftAjax.debug.js (AS WELL AS /js/MicrosoftAjax.js )? I had precisely your error, but with this config, I don't -- on 2 different machines.

    Best regards,
    R
  22. T F
    T F avatar
    8 posts
    Member since:
    May 2010

    Posted 08 Jun 2010 Link to this post

    I followed this thread and downloaded the latest bits.  Nothing has worked.  Hope you guys come up with something soon.

    Error 1:
    "Microsoft JScript 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."

    Error 2:
    Parser Error Message: Type 'Telerik.Web.UI.RadScriptManager' does not have a public property named 'EnableCdn'.


    Telerik Version: 2010.1.519.35
  23. dominique
    dominique avatar
    1 posts
    Member since:
    Jun 2010

    Posted 08 Jun 2010 Link to this post

    Hi All,
    We are currently on the 3.5 framework and upgrading to 4.0 is the last option so we won't unless we absolutely have no other option. Due to a salesforce security audit we are upgrading to the ajaxcontroltoolkit version 3.5. however when we do pages that use both ACT and telerik.web.ui are erroring out with the error Richard reported. 

    get_request()._get_eventHandlerList()._list.completed.reverse() object not found.

    so do "Telerik Support" or anyone. is there a workaround for act (3.5) and framework 3.5? and can telerik produce a build that will work under this circumstance?

    thanks in advance

    -dominique
  24. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 09 Jun 2010 Link to this post

    Okay, I have now dropped the debug scripts into the folder and instead I get:

    "Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
    Parameter name: element"

    On line 4617 of MicrosoftAjax.debug.js

     

    if

     

     

    (!element) throw Error.argument('element', Sys.Res.createNoDom);


    Craig

     

  25. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 09 Jun 2010 Link to this post

    Well at least we know that the changes made a difference :-) You need the non-debug .js versions if any of your code is running in realease mode -- any of it. But you will also need the debug.js versions in the same directory, in case any of your code is running in debug mode -- any of it. If you load the release versions, the debug versions will be automatically loaded for debug mode, as long as the name convention remains. So, see what happens if both are in the directory, and both, of course from the ATC sources.

    Regards,
    R
  26. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 09 Jun 2010 Link to this post

    Hi. I just want to confirm that the constellation works as described above -- i.e. is a feasible constellation -- but it has to be precisely as described above (or another way that works too :-). I'm using this constellation on 2 machines with a site that mixes Telerik, ACT, ASP.NET 4.0, IIS7.5 AppPool4.0, jQuery, and Prototype.js... and uses all of these quite intenively.
    R

  27. Carlos Teevin
    Carlos Teevin avatar
    2 posts
    Member since:
    May 2010

    Posted 09 Jun 2010 Link to this post

    i Can make it work if i disable terlerik CDN, but then the radajaxpanel or updatepanel refresh entire webpage.
  28. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 09 Jun 2010 Link to this post

    >> i Can make it work if i disable terlerik CDN, but then the radajaxpanel or updatepanel refresh entire webpage.
    Two things here:
    1. The Content Delivery Network and the UpdatePanels don't have anything to do with each other, so it must be a side effect of loading DIFFERENT scripts when you are not using the CDN. The CDN will always load the current release version of the scripts for the Telerik Version that you have installed.
    2. I used to have to disable the CDN since I was using a patched version of the Telerik javascript (about the time this thread started), but the newest release version of the Telerik software (see above) includes these patches, so I can now enable the CDN, as shown above.

    R
  29. Alex Ruggeri
    Alex Ruggeri avatar
    4 posts
    Member since:
    Jan 2010

    Posted 23 Jun 2010 Link to this post

    Hi Guys,

    Do telerik plan any official fixes / worksarounds for this problem in the next build?

    Cheers

    Pete
  30. T. Tsonev
    Admin
    T. Tsonev avatar
    2774 posts

    Posted 25 Jun 2010 Link to this post

    Hi,

    I'm happy to announce that the next internal build (available later today) will be fully compatible with the ACT for .NET 4.0 sites. Read this forum post for more more details.

    We don't have a solution for .NET 3.5 sites apart from loading the scripts externally. This is also described in the forum post.

    I hope this helps.

    All the best,
    Tsvetomir Tsonev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top