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

Running into Issues after Implementing RadCompression

5 Answers 192 Views
Compression
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 09 Aug 2011, 02:46 PM
As a quick background we currently have a very basic ASP.NET website using Forms Authentication.  The website itself is only about 6 pages with no real functionality or code behind, it's mainly just styles and some JavaScript.  The Main functionality of our application is contained in Silverlight applications contained on those pages.  We recently had a need to implement compression on our WCF Service calls and decided to look at RadCompression since we were all ready using Telerik controls inside of our Silverlight application.

The first issue I noticed is that on my development machine when running the application along side Fiddler in order to view the responses coming back from the server I receive an HTTP Protocol Violation on every service response of a Content-Length Mismatch.  What it appears to be doing is sending the uncompressed byte size in the header but then sending the body compressed which is different amounts.

Here is an example:

Fiddler has detected a protocol violation in session #25.
Content-Length mismatch: Response Header indicated 14,105,406 bytes, but server sent 1,304,570 bytes.

This error is mostly an annoyance as I have to clear out all of them and we make quite a few service calls.  

It however only happens on my local development machine, when deployed to an IIS instance it works fine.  

My second problem, only happens when deployed to IIS. 

After deploying the website to IIS I've run through it (while running Fiddler) and noticed that it's compressing not only the service calls but the actual Pages of the site as well.  From my understand and what I read on the RadCompression documentation it's not supposed to do that unless we specifically tell it to.  

The only thing that I have done to implement Rad Compression was add this section to my web config:
<system.webServer>
   <modules runAllManagedModulesForAllRequests="true">
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
    </modules>
</system.serviceModel>
And then drop the Telerik.Web.UI.dll into my bin folder.  

No other settings have been changed, so shouldn't it only be compressing my service calls?

Finally, also only when deployed to IIS we are having problems logging out through Forms Authentication.  What happens is when we click the Log Out link it simply refreshes the page but does not log the user out.  If I comment the web.config line for RadCompression everything works as expected.  So since the only change i'm making is enabling RadCompression I am Certain that it is the cause of the log out button not functioning properly.  Perhaps if we had more functionality on the ASP.NET side it would cause problems there too.

Here is the code for the log out button for reference.

<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
    <AnonymousTemplate>
        [ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
    </AnonymousTemplate>
    <LoggedInTemplate>
        Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
        [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
    </LoggedInTemplate>
</asp:LoginView>

5 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 12 Aug 2011, 08:55 AM
Hello Michael,

I have already addressed the support ticket that was opened on the same topic. To avoid duplicate posts, lets continue our communication there.

All the best,
Martin
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.

0
Gotcha
Top achievements
Rank 1
answered on 29 May 2013, 09:07 PM
Can you post the solution here as well?

I'm having an issue as well when I tried to implement radcompression... at first it gave a js pagerequestmanager error... I got some insight from another forum, saying they added a line in the section below.

Adding the Exclude Handler section removed the PageRequestManager error for Ajax post  back... but one of the ajax post back is a page redirect... and it just ignored the response.redirect("~/Pages/PPSA.aspx", true); or any redirect

<configSections>
....................
<sectionGroup name="telerik.web.ui">
      <section name="radCompression" type="Telerik.Web.UI.RadCompressionConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication" requirePermission="false"/>
</sectionGroup>
....................
</configSections>
<telerik.web.ui>  
   <radCompression enablePostbackCompression="true"/>
<excludeHandlers>
<add handlerPath="" matchExact="true"/>  <!-- This apparently made the difference in my case, this allowed me to run RadCompression and avoid the pageRequestManager error on ajaxpostbacks -->
</excludeHandlers>
</telerik.web.ui>
0
Radoslav
Telerik team
answered on 03 Jun 2013, 06:44 AM
Hello Gotcha,

I noticed that you have opened a duplicate post on the same matter. Please, refer to the other support ticket post for additional information. To avoid duplicate posts, I suggest you continue the communication there.
Additionally I am pasting the response from the support ticket here:
I saw that you use our dll for .net 3.5 version, however the example that I sent you is built on .net 4.0 version. Could you please confirm that your project is built on 3.5? Also if you project is built on .net 4.0 you need to use .net 4.0 version of our dlls.

Regards,
Radoslav
Telerik
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.
0
Gotcha
Top achievements
Rank 1
answered on 03 Jun 2013, 11:44 AM

Radpslav,

First thanks for your answer... I will confirm it later if this was my case.

Although I love the idea of having public forums, for the following reasons:
1. Having other users share their experience/issues and possible solutions
2. Have access to Telerik's expert

sometimes ( if not most of the times) it can take very long to get an answer...Having already a paid subscription and given I didnt get an answer . .. I felt compelled to send a ticket instead...to make sure I get one.
Also, would it be possible to merge paid threads to public forums...For example when a public ticket ends up as a subscribed forum ticket.... like this thread for example...

Both Michael and I probably posted both places because of the same reason...

0
Radoslav
Telerik team
answered on 06 Jun 2013, 06:19 AM
Hello Gotcha,

Thanks for your feedback, it makes sense. I will forward it to the corresponding departments for further considerations.
Additionally please note that for now opening support ticket instead writing into the forums guarantees you faster response time. If you need further assistance, do not hesitate to contact us again.

Regards,
Radoslav
Telerik
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 the blog feed now.
Tags
Compression
Asked by
Michael
Top achievements
Rank 1
Answers by
Martin
Telerik team
Gotcha
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or