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

RadCompression and Chrome issue

1 Answer 102 Views
Compression
This is a migrated thread and some comments may be shown as answers.
Lucania
Top achievements
Rank 1
Lucania asked on 22 Mar 2012, 12:24 AM
A few weeks ago, I decided to try RadCompression on my website, and followed the instructions here. It seemed to work fine in FireFox (which I use for development), but when we finally got around to cross-browser testing, found that several pages started getting an exception in System.Web.UI.Page.RegisterRequiresControlState(), for example:
[InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Collections.IDictionary'.]
   System.Web.UI.Page.RegisterRequiresControlState(Control control) +104
   System.Web.UI.WebControls.PasswordRecovery.OnInit(EventArgs e) +32
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
   System.Web.UI.ControlCollection.Add(Control child) +80
   System.Web.UI.WebControls.Login.CreateChildControls() +175
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +23
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Page.FindControl(String id) +38
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +232
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

In debugging the issue, I found that
1. It only seems to affect Chrome browser
2. Removing RadCompression stopped the error
3. Keeping RadCompression but changing the browser controlAdapter from RadSessionPageStateCompression to RadHiddenFieldPageStateCompression stopped the error

Is there any reason why this would happen only in Chrome? Is there something else I need to use RadSessionPageStateCompression?

Thanks for any info

[Edit: I'm using v2011.1.519.35]

Ross Crawford

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 22 Mar 2012, 10:49 AM
Hello Ross Crawford,

It looks like the issue is connected to the correct decompressing of the viewstate. Both RadSessionPageStateCompression and RadHiddenFieldPageStateCompression are used for the same purpose - compressing the viewstate. You would normally use the first one to almost completely remove any viewstate information of the page. However in case its size is not such a problem you can always compress it in a hidden field by using RadHiddenFieldPageStateCompression.

In all cases the issue quite strange and I would suggest that you send us some additional information about the scenario you observe it under. If you have a valid support subscription, please consider assembling a runnable demo and send it through a formal support ticket. This way I will be able to inspect it locally and provide more to the point resolution.

Greetings,
Martin
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
Compression
Asked by
Lucania
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or