RadXmlHttpPanel Sys.ArgumentTypeException

2 posts, 0 answers
  1. Dennis
    Dennis avatar
    4 posts
    Member since:
    Mar 2011

    Posted 24 Jun 2011 Link to this post

    Hi,

    When I quickly refreshes my webpage, with a set of raddocks that each have a RadXmlHttpPanel with a method to call a webservice to get the content, I get an error foreach RadXmlHttpPanel: 

    Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Telerik.Web.UI.RadXmlHttpPanelEventArgs'
    cannot be converted to type 'Sys.CancelEventArgs'.
    Parameter name: instance

    It looks like it is caused by the OnClientResponseError method.
    Is this a known issue or can someone explain me why it happens or what I can do to avoid it ?
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 29 Jun 2011 Link to this post

    Hi Dennis,

    Could you please tell me what browser you are using? We had one similar case when the user was getting such error with the XmlHttpPanel control, but it was only under IE6, and the problem was related to the browser itself. Here is a detailed explanation:

    The main problem comes from the fact that Internet Explorer 6 does not support gzip compression, and all the other major (modern) browsers (IE7 & 8, Firefox, Opera, Safari and Chrome) support.
    Let me explain in details how the problem is caused.

    By default, the HTML content received from the callback (web service) and pasted within the XmlHttpPanel contains two <script/> element that refer to built-in MS Ajax script files. When the client scripts are evaluated by the XmlHttpPanel, these two script files (they are always the first two) are omitted, because they have already been loaded from the MS Ajax Framework. The web-server caches these two script files are cached, when they are requested for the first time. The modern browsers always request compressed scripts, while the IE6 browser requests non-compressed scripts. The web-server always sends the cached scripts whether or not the browser requested compressed scripts. If the cached scripts are compressed, and the page is requested by IE6, then the browser will request for non-compressed scripts, which will cause 2 additional scripts to be loaded and evaluated by the XmlHttpPanel. This will cause one and the same script to occur twice, and a JavaScript error will be thrown.
    If the cached scripts are non-compressed, the modern browsers will request for compressed scripts, and this again will cause 4 scripts to be loaded.
    That's why the JavaScript errors sometimes occur in IE6, and other times under different browsers (if the first request is made by IE6 the error will occur in the rest of the browsers, and if the request is made by Firefox [for example] the error will occur only in IE6).

    All this being said, the issue is related to IE6 browser's support for non-compressed scripts only and not to our control. I think Microsoft introduced support for compressed scripts in the latest updates for IE6. Please download the latest version of IE6 and see if the problem still occurs.


    If the problem persists please send us some sample code so we can debug it locally and provide an adequate solution.

    Best wishes,
    Pero
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top