I am currently successfully compressing the server responses to HTTP requests for both regular requests and XMLHTTPRequests.
Unfortunately, some of my users are experiencing the following (per browser's debugging tools):
- The Request Header specifies its content-length at over three million bytes
- The Form Data section of the Request does in fact contain the key "__VIEWSTATE", whose value is 3MB (corroborating the Request Header size)
- The Request Sent time is over a minute, because the upload speed is abysmal.
So, I'm interested in compressing the view state specifically for XMLHTTPRequests, with the expectation that this will behave better with the user's upload speeds. I've attempted to use the RadCompression module to do this, and have been unsuccessful, which leads me to my question here:
How can I compress the Request Header of an AJAX request (containing the view state)?
I am referring to the following link http://docs.telerik.com/devtools/aspnet-ajax/controls/radcompression
I have gone over all topics online, all tutorials, all recommendations and they are all pointing at how the "browser" file in the app_browser should be included and how the web.config file should be altered etc..
The article clearly states that the reduction will be between 40% to 60% or more depending on different factors. So, in order to clearly test the impact, i created an empty ASP.Net web forms application, added a masterpage and a content page with nothing but a RadScriptManager, RadGrid and Radeditor to just test how the viewstate is initially and then how applying the above will affect it.
The results were the following: Initially, the viewstate size was 9000 bytes without adding anything or any compressions, after applying the above (unless the documentation changed), the bytes have increased to 9100! not even decreased!
So, i am currently lost and i need to badly shrink the viewstate as much as possible to save on the bandwidth and performance.
I am using UI for ASP.NET AJAX Q2 2016, not sure if that affects the Radcompression module or not. Your assistance with this is highly appreciated (a sample project/configuration would go a long way)
Hello Telerik Team,
Kindly, I got an error regarding the casting of a telerik object. I have removed the telerik compresion but my application is using a dinamic layer to create the control in the page, Also i will be removing the telerik compresion for all the clases in the control layer. Please can you provide more information regarding the below error, see the details:
Impossible d'effectuer un cast d'un objet de type 'Telerik.Web.UI.CompressedPageState' en type 'System.Collections.IDictionary'.
Informations sur l'erreur: Type: InvalidCastException Message: Impossible d'effectuer un cast d'un objet de type 'Telerik.Web.UI.CompressedPageState' en type 'System.Collections.IDictionary'. Trace de la pile: à System.Web.UI.Page.RegisterRequiresControlState(Control control) à Telerik.Web.UI.RadComboBox.OnInit(EventArgs e) à System.Web.UI.Control.InitRecursive(Control namingContainer) à System.Web.UI.Control.AddedControl(Control control, Int32 index) à System.Web.UI.ControlCollection.Add(Control child) à Telerik.Web.UI.GridPagerButtonBuilder.CreatePageSizeDropDown(Panel container) à Telerik.Web.UI.GridPagerButtonBuilder.CreatePageSize(Panel container) à Telerik.Web.UI.GridPagerItem.InitializePagerItem(GridColumn[] columns) à Telerik.Web.UI.GridPagerItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) à Telerik.Web.UI.GridTableView.CreateTopPagerItem(Boolean useDataSource, GridColumn[] copiedColumnSet, Boolean isPagingEnabled, GridTHead thead) à Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) à Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) à System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) à System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) à System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) à System.Web.UI.WebControls.DataBoundControl.PerformSelect() à Telerik.Web.UI.GridTableView.PerformSelect() à System.Web.UI.WebControls.BaseDataBoundControl.DataBind() à Telerik.Web.UI.GridTableView.DataBind() à Telerik.Web.UI.RadGrid.DataBind() à Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) à Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) à Env.MYAPPLICATION.Web.Controles.FormulaireGrilleGenerique`1.OnLoad(EventArgs e) dans e:MYAPPLICATION\Env.MYAPPLICATION.Web.Controles\FormulaireGrilleGenerique.cs:ligne 90 à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Control.LoadRecursive() à System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Line 90: MYAPPLICATION\Env.MYAPPLICATION.Web.Controles\FormulaireGrilleGenerique.cs:ligne 90:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
}
A client site is running our ASP.NET 3.5 web-application which includes the Report Viewer control for reporting. They have recently upgraded to IE11, which must be run in native/standards mode.
In order to get the print function of the Report Viewer control working, we have upgraded the Report Viewer control to the 2012 version and have applied patches / updates as per instructions here:
https://blogs.msdn.microsoft.com/selvar/2013/12/20/reportviewer-2012-control-not-showing-print-icon-when-viewed-from-ie-11-desktop-mode/
Part of these instructions are to remove any browser files, however we are currently using the RadHiddenFieldPageStateCompression utility to compress viewstate (specified as per Telerik documentation in the Default.browser file).
If we remove the Default.browser file, the Report Viewer print function operates correctly, but viewstate compression no longer works. Adding the Default.browser file back in, hides the print button on the Report Viewer control.
Is there any way that we can retain viewstate compression and use the SSRS 2012 Report Viewer print function?
Thanks.
Hi Telerik
I Use IIS 8 and i want to enable RadCompression in my application .
in App_Browsers
<
browsers
>
<
browser
refID
=
"Default"
>
<
controlAdapters
>
<
adapter
controlType
=
"System.Web.UI.Page"
adapterType
=
"Telerik.Web.UI.RadHiddenFieldPageStateCompression"
/>
<
adapter
controlType
=
"System.Web.UI.Page"
adapterType
=
"Telerik.Web.UI.RadSessionPageStateCompression"
/>
</
controlAdapters
>
</
browser
>
</
browsers
>
in web.config
<
system.web
>
.
.
.
<
httpModules
>
<
add
name
=
"RadCompression"
type
=
"Telerik.Web.UI.RadCompression"
/>
</
httpModules
>
</
system.web
>
How can i optimize viewstate and compressing AJAX and Web Service responses in my application ?
please help me ...
Thanks .
Hi dear Telerik
I want to enable Compression in my website . How can i do it ?
I use IIS 8 .
Another question : How can i do for performance in my website when using Ajax UI telerik ?
Thanks .
document.getElementById(rcComboBox).disabled =
true;
My requirement is ..
One text box and one radcombobox are there.
Based on some value in the textbox, I have to make disable and enable the combobox and also select value in combox will get change based on the textbox value.