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:
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.
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
>
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
>