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

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

4 Answers 401 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Jeremy Mann
Top achievements
Rank 1
Jeremy Mann asked on 23 Sep 2009, 04:15 PM
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:

#######
RadAjaxManagerProxy
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?

-Jeremy

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Sep 2009, 07:49 AM
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.

Regards,
Albert,
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.
0
Ravi Kirpane
Top achievements
Rank 1
answered on 29 Jul 2010, 04:51 PM
0
Dan
Top achievements
Rank 1
answered on 21 Dec 2011, 03:15 AM
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.
0
Genady Sergeev
Telerik team
answered on 26 Dec 2011, 09:17 AM
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
Tags
ScriptManager and StyleSheetManager
Asked by
Jeremy Mann
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Ravi Kirpane
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or