RadScriptManager which proxy should I use? "The resource URL cannot be longer than 1024 characters"

5 posts, 0 answers
  1. Jeremy Mann
    Jeremy Mann avatar
    23 posts
    Member since:
    Jul 2009

    Posted 23 Sep 2009 Link to this post

    I get the following error using the RadScriptManger with about 15 refrenced scriptRefrences under it as a CompositeScript. I know WHY it's happening (I'm sure its an inherited wall that comes from asp:ScriptManager), I'm just looking for the best way to solve it when using the RadScriptManager:

    The resource URL cannot be longer than 1024 characters. If using a CompositeScriptReference, reduce the number of ScriptReferences it contains, or combine them into a single static file and set the Path property to the location of it.

    Before I started using the RadScriptManager I had a standard ScriptManager with a set of (3) ScriptManagerProxy's  and then split the number of static scripts between them. This solves the issue by keeping 5 or 6 scripts to each given proxy instead of 15 in one. I can't find a RadScriptManagerProxy, only the RadAJAXManagerProxy which I'm assuming needs the RadAjaxManager instead of the RadScriptManager.

    Todd Anglins blog post seen [HERE] states:

    If you are familiar with ASP.NET AJAX, then you know that every ASP.NET AJAX page requires a single ScriptManager to function correctly. Most sites that are built with MasterPages simplify this by placing the ScriptManager in the MasterPage so that all ContentPages automatically work with ASP.NET AJAX. To add additional settings to the ScriptManager in a ContentPage, a control called the ScriptManagerProxy is used to declaratively set additional settings. At run time, the ScriptManager looks for instances of the ScriptManagerProxy in child containers and automatically loads any settings it finds.

    So it is with the RadAjaxManager and the new RadAjaxManagerProxy. You can now (with no hesitation) add a single RadAjaxManager to your MasterPage and then use RadAjaxManagerProxies in ContentPages and UserControls to configure your Ajax interactions. No more worrying about multiple RadAjaxManagers on the page. No more hand coding to ajaxify all of your UserControls. The RadAjaxManagerProxy gives you the full codeless design-time configurator that's available with the RadAjaxManager, and the RadAjaxManager automatically loads all Proxy settings at run time.


    1) Whats the real difference between RadScriptManager and the RadAjaxManager?  Is the RadAjaxManager a replacement for the RadScriptManager?  The term "Ajax" in the name makes me question sticking static composite scripts in there.

    2) Should I continue to use the standard "ScriptManagerProxy" to solve this script combining issue? If not, what should I be using with the RadScriptManager, or should I change to the RadAjaxManager?


  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 25 Sep 2009 Link to this post

    Hello Jeremy Mann,

    I suggest you use normal ScriptReferences as they are handled by RadScriptManager. Composite scripts are handled by the bult-in ScriptManager which is the base class of RadScriptManager.

    There is a big difference between RadAjaxManager and RadScriptManager. RadAjaxManajer is used to ajaxify controls in the page converting postback to ajax requests. RadScriptManager is our enhanced ScriptManager which provides script combination and addresses the 1024 character limit. Using ScriptManagerProxy works as expected with RadScriptManager and this is the reason we don't have RadScriptManagerProxy components.

    In a word I recommend you include your scripts as normal ScriptReference tags. If they are embedded as web resources in some assembly RadScriptManager will combine them. If not you can use the ScriptManagerProxy workaround.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
  4. Ravi Kirpane
    Ravi Kirpane avatar
    7 posts
    Member since:
    Mar 2009

    Posted 29 Jul 2010 Link to this post

  5. Dan
    Dan avatar
    3 posts
    Member since:
    Aug 2010

    Posted 20 Dec 2011 Link to this post

    Albert's reply on this thread indicates that the RadScriptManager "addresses the 1024 character limit" but I'm still getting this same error with the RadScriptManager.
  6. Genady Sergeev
    Genady Sergeev avatar
    1595 posts

    Posted 26 Dec 2011 Link to this post

    Hello Jeremy,

    I've transferred this forum post to a Product Feedback ticket.

    As far as I know, this problem is indeed resolved long time ago and we haven't received reports from customers regarding it until then. Is it possible to isolate the issue in a sample project and send it to us so that we can troubleshoot it?

    Kind regards,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
DevCraft R3 2016 release webinar banner