This is a migrated thread and some comments may be shown as answers.
RadCompression issues.
4 Answers 135 Views
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 12 Oct 2011, 11:09 PM
Hello Telerik,

I am re-visiting RadCompression for my web application. I had attempted to implement RadCompression preivously, but encountered issues. I have attempted to re-implement RadCompression, but am still encountering issues, so I am here. :)

So, first off, a bit of information about my working environment. The solution I am working in is broken into two parts. The main architecture is ASP.NET MVC 2.0. There is a portion of the solution that is ASP.NET AJAX. It's all targeting 4.0 framework.

The ASP.NET AJAX portion of my web application contains all Telerik controls. I have not experienced any issues using the Telerik controls in this manner. 

Now, I have just gone through http://www.telerik.com/help/aspnet-ajax/radcompression.html and followed the step-by-step instructions on how to implement rad compression. In my Web.Config file I have the following entries:

    <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
    </httpModules>
</system.web>

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
     </modules>

Under the latest version of Google Chrome I do not encounter any issues.
Under the latest version of Opera I do not encounter any issues.
Under the latest version of Internet Explorer I experience only minor issues. One of our web services is unable to be loaded with RadCompression enabled. I am (relatively) confident that with some time I could set up the proper exclusionary rules to make this a non-issue.

That's about where the good news ends. Under the latest version of FireFox I am presented with an (presumed) uncompressed stream of data. It looks like this:

��`I�%&/m�{J�J��t��`$ؐ@�����iG#)�*��eVe]f@�흼��{���{��;�N'���?\fdl��J�ɞ!���?~|?"~�?�7�5��:��������t�g��������w~�w������?��-��O�=���������O��~������~��g�̿��������}��?�����/��=������������,���;��?���_�O�.��/������������?����S���?��������w�� ��?�/�]�������_����x�K~�������������������_����+��O�����������9���������������������?����^��1��������������ݟ�Kڧ�o��������_5�.~������߳�/�������������O-_��_��}�~����������˟��/����������������i����?�����������\��������O�������o�������?����/���꫿}�_�+����W������_����?��������?�_������ۯ�M����_���?�_y�����Ϳ^_�ʿ������o���������������{����;������l/����]��/>��������������~��o���O��_�}�'���̿�������5��os����?��?�7}�G]�����'~��w�/�+~�㣿�9�s��]~�?��_�������������o���������s���������W����~ɟ6�_.���WϿ����W��/�_����W�}޿�3�������_�+����o_�������������_�O���?��޻�{�U�ŗ���w�9�/�/����ϼ����?�_����9�['��������u��G����;��?���O�s��;���o�������c�����������������'���n�����������ƛ�/�/�����%���?�w�������_����_������������oy��_���������W��������?�����������_����/?����?�⟙�����'�+���w���?����g�w���������߿�??��o�����_������o�O�Go�����������������c��������W~�������/�~���� ����������{�����������e��?����������G��_���?e���1���� �������W?Ӽ{�O�>�_|�_���/���_�_�Y��y�W�����~���W����-���^��������k�����7����_�vr������W���7~���%��e�W�����O���7>�sv/���O��_�{������_�?����أ?��G����N�������v���S���?�O�?�5~�������G�_�����:���

The latest version of Safari follows suit and presents me with the garbage text, as well.

What steps should I be taking to debug this issue? What are common scenarios which would cause these issues?

Just as additional information...here is my RegisterRoutes method inside of Global.asax.cs. In addition, I have included the entirety of my web.config to this thread. It's a large-ish file, but I thought it might be useful in answering my questions.

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.IgnoreRoute("ChartImg.axd/{*pathInfo}");
    routes.IgnoreRoute("{controller}/ChartImg.axd/{*pathInfo}");
    routes.IgnoreRoute("{controller}/{action}/ChartImg.axd/{*pathInfo}");
 
    routes.MapRoute("Components", "Component/Index/{ID}", new {controller = "Component", action = "Index", id = ""});
 
    routes.MapRoute(
        "Default",                                              // Route name
        "{controller}/{action}/{ID}",                           // URL with parameters
        new { controller = "LogIn", action = "Index", id = "" // Parameter defaults
    );
 
    routes.MapRoute(
        "Root",
        "",
        new { controller = "Home", action = "Index", id = "" }
    );
}

<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <configSections>
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <section name="Cormant.Web.Mvc.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
            <section name="CableSolve.Web.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
 </configSections>
    <appSettings>
        <add key="ChartImageHandler" value="storage=session;deleteAfterServicing=false;WebDevServerUseConfigSettings=true;" />
        <add key="Telerik.Web.UI.StyleSheetFolders" value="~/Content/Dashboard;~/Content/redmond;~/Content/Images;~/Content" />
    </appSettings>
    <connectionStrings />
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
    -->
        <!--
      Set compilation debug="true" to insert debugging
      symbols into the compiled page. Because this
      affects performance, set this value to true only
      during development.
    -->
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        --><compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
                <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
    -->
        <authentication mode="Forms">
            <forms loginUrl="~/LogIn" timeout="2880" name=".ASPXFORMSAUTH" defaultUrl="~/Dashboard/Dashboard.aspx" />
        </authentication>
        <authorization>
            <deny users="?" />
        </authorization>
        <membership>
            <providers>
                <clear />
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" />
            </providers>
        </membership>
        <profile>
            <providers>
                <clear />
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="/" />
            </providers>
        </profile>
        <roleManager enabled="false">
            <providers>
                <clear />
                <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            </providers>
        </roleManager>
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
    -->
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
            <namespaces>
                <add namespace="System.Web.Mvc" />
                <add namespace="System.Web.Mvc.Ajax" />
                <add namespace="System.Web.Mvc.Html" />
                <add namespace="System.Web.Routing" />
                <add namespace="MvcContrib.UI.Html" />
                <add namespace="Cormant.Web.Mvc" />
                <add namespace="CableSolve.Web.Controllers.Extensions" />
            </namespaces>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add tagPrefix="nStuff" namespace="nStuff.UpdateControls" assembly="nStuff.UpdateControls, Version=1.2.0.0, Culture=neutral, PublicKeyToken=954a7d0922d0cc55" />
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            </controls>
        </pages>
        <sessionState timeout="2880" />
        <!--EKS 2011.06.14<globalization culture="en-GB" uiCulture="en-GB"/>  Do we really want to force the culture setting?  Shouldn't it be the user's settings?-->
        <httpHandlers>
            <remove verb="*" path="*.asmx" />
            <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
            <add verb="*" path="combinescript.axd" validate="false" type="Cormant.Web.Mvc.CombineScriptHandler, Cormant.Web.Mvc" />
            <add verb="*" path="combinecss.axd" validate="false" type="Cormant.Web.Mvc.CombineCssHandler, Cormant.Web.Mvc" />
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
            <add verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
            <add verb="GET" path="*.xap" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.zip" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.css" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.js" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.png" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.jpg" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.gif" type="System.Web.StaticFileHandler" />
            <add verb="GET" path="*.ico" type="System.Web.StaticFileHandler" />
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
 
            <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
            <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
            <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
            <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
        </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
        </httpModules>
    </system.web>
    <!-- log4net configuration settings : start -->
    <log4net>
        <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
            <file value="logs/csweb.log" />
            <appendToFile value="true" />
            <rollingStyle value="Composite" />
            <datePattern value="yyyyMMdd" />
            <maxSizeRollBackups value="3" />
            <maximumFileSize value="10MB" />
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
            </layout>
        </appender>
        <root>
            <level value="ERROR" />
            <appender-ref ref="RollingLogFileAppender" />
        </root>
    </log4net>
    <!-- log4net configuration settings : end -->
    <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
  -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
            <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
    </modules>
        <handlers>
            <remove name="MvcHttpHandler" />
            <remove name="UrlRoutingHandler" />
            <remove name="ChartImageHandler" />
            <remove name="Telerik_Web_UI_WebResource_axd" />
 
            <remove name="WebServiceHandlerFactory-Integrated" />
            <remove name="ChartImage_axd" />
            <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
            <remove name="Telerik_Web_UI_DialogHandler_aspx" />
            <remove name="Telerik_RadUploadProgressHandler_ashx" />
            <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
            <add name="CombineScriptHandler" preCondition="integratedMode" verb="*" path="combinescript.axd" type="Cormant.Web.Mvc.CombineScriptHandler, Cormant.Web.Mvc" />
            <add name="CombineCssHandler" preCondition="integratedMode" verb="*" path="combinecss.axd" type="Cormant.Web.Mvc.CombineCssHandler, Cormant.Web.Mvc" />
            <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
            <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
            <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
            <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
            <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
        </handlers>
    </system.webServer>
    <system.serviceModel>
        <bindings>
   <basicHttpBinding>
    <binding name="ComponentServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="ConnectionServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="IconServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="PlanViewServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="ReportServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="ScriptServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="SecurityServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="SubcomponentGroupServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="SubcomponentServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="SupplyDemandServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="TemplateServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="WebLayoutServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="WorkOrderServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="AttributeServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="ComponentSearchServicesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="8388608" maxBufferPoolSize="16777216" maxReceivedMessageSize="8388608" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8388608" maxArrayLength="8388608" maxBytesPerRead="4096" maxNameTableCharCount="32768" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
   </basicHttpBinding>
  </bindings>
        <client>
   <endpoint address="http://localhost/cswebapi/ConnectionServices.asmx" binding="basicHttpBinding" bindingConfiguration="ConnectionServicesSoap" contract="ConnectionServicesProxy.ConnectionServicesSoap" name="ConnectionServicesSoap" />
   <endpoint address="http://localhost/cswebapi/IconServices.asmx" binding="basicHttpBinding" bindingConfiguration="IconServicesSoap" contract="IconServicesProxy.IconServicesSoap" name="IconServicesSoap" />
   <endpoint address="http://localhost/cswebapi/PlanViewServices.asmx" binding="basicHttpBinding" bindingConfiguration="PlanViewServicesSoap" contract="PlanViewServicesProxy.PlanViewServicesSoap" name="PlanViewServicesSoap" />
   <endpoint address="http://localhost/cswebapi/ReportServices.asmx" binding="basicHttpBinding" bindingConfiguration="ReportServicesSoap" contract="ReportServicesProxy.ReportServicesSoap" name="ReportServicesSoap" />
   <endpoint address="http://localhost/cswebapi/ScriptServices.asmx" binding="basicHttpBinding" bindingConfiguration="ScriptServicesSoap" contract="ScriptServicesProxy.ScriptServicesSoap" name="ScriptServicesSoap" />
   <endpoint address="http://localhost/cswebapi/SecurityServices.asmx" binding="basicHttpBinding" bindingConfiguration="SecurityServicesSoap" contract="SecurityServicesProxy.SecurityServicesSoap" name="SecurityServicesSoap" />
   <endpoint address="http://localhost/cswebapi/SubcomponentServices.asmx" binding="basicHttpBinding" bindingConfiguration="SubcomponentServicesSoap" contract="SubcomponentServicesProxy.SubcomponentServicesSoap" name="SubcomponentServicesSoap" />
   <endpoint address="http://localhost/cswebapi/SupplyDemandServices.asmx" binding="basicHttpBinding" bindingConfiguration="SupplyDemandServicesSoap" contract="SupplyDemandServicesProxy.SupplyDemandServicesSoap" name="SupplyDemandServicesSoap" />
   <endpoint address="http://localhost/cswebapi/TemplateServices.asmx" binding="basicHttpBinding" bindingConfiguration="TemplateServicesSoap" contract="TemplateServicesProxy.TemplateServicesSoap" name="TemplateServicesSoap" />
   <endpoint address="http://localhost/cswebapi/WebLayoutServices.asmx" binding="basicHttpBinding" bindingConfiguration="WebLayoutServicesSoap" contract="WebLayoutServicesProxy.WebLayoutServicesSoap" name="WebLayoutServicesSoap" />
   <endpoint address="http://localhost/cswebapi/WorkOrderServices.asmx" binding="basicHttpBinding" bindingConfiguration="WorkOrderServicesSoap" contract="WorkOrderServicesProxy.WorkOrderServicesSoap" name="WorkOrderServicesSoap" />
   <endpoint address="http://localhost/cswebapi/SubcomponentGroupServices.asmx" binding="basicHttpBinding" bindingConfiguration="SubcomponentGroupServicesSoap" contract="SubcomponentGroupServicesProxy.SubcomponentGroupServicesSoap" name="SubcomponentGroupServicesSoap" />
   <endpoint address="http://localhost/cswebapi/AttributeServices.asmx" binding="basicHttpBinding" bindingConfiguration="AttributeServicesSoap" contract="AttributeServicesProxy.AttributeServicesSoap" name="AttributeServicesSoap" />
   <endpoint address="http://localhost/cswebapi/ComponentSearchServices.asmx" binding="basicHttpBinding" bindingConfiguration="ComponentSearchServicesSoap" contract="ComponentSearchServicesProxy.ComponentSearchServicesSoap" name="ComponentSearchServicesSoap" />
   <endpoint address="http://localhost/cswebapi/ComponentServices.asmx" binding="basicHttpBinding" bindingConfiguration="ComponentServicesSoap" contract="ComponentServicesProxy.ComponentServicesSoap" name="ComponentServicesSoap" />
  </client>
    </system.serviceModel>
    <applicationSettings>
        <Cormant.Web.Mvc.Properties.Settings>
            <setting name="UseMinifyJsAlways" serializeAs="String">
                <value>False</value>
            </setting>
            <setting name="CombineScriptsAlways" serializeAs="String">
                <value>False</value>
            </setting>
            <setting name="CombinedScriptsExpiration" serializeAs="String">
                <value>31.00:00:00</value>
            </setting>
            <setting name="UseMinifyCssAlways" serializeAs="String">
                <value>False</value>
            </setting>
            <setting name="CombineCssAlways" serializeAs="String">
                <value>False</value>
            </setting>
            <setting name="CombinedCssExpiration" serializeAs="String">
                <value>31.00:00:00</value>
            </setting>
        </Cormant.Web.Mvc.Properties.Settings>
        <CableSolve.Web.Properties.Settings>
   <setting name="GuestUserName" serializeAs="String">
    <value>guest</value>
   </setting>
   <setting name="GuestPassword" serializeAs="String">
    <value>cablesolve</value>
   </setting>
   <setting name="HistoricalDataSampleSize" serializeAs="String">
    <value>100</value>
   </setting>
   <setting name="GenerateBoothReportAttributes" serializeAs="String">
    <value>327, 329, 330, 369, 342</value>
   </setting>
  </CableSolve.Web.Properties.Settings>
    </applicationSettings>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>

4 Answers, 1 is accepted

Sort by
0
Hus Damen
Top achievements
Rank 1
answered on 17 Oct 2011, 11:53 AM
Hi,

It looks like a firefox issue. Have you checked that you have gzip compression enabled for firefox?

Thanks,
Hus
0
Sean
Top achievements
Rank 2
answered on 17 Oct 2011, 05:09 PM
Hi Hus,

IMO, regardless of client-side configuration, this should not be the end result. If GZIP compression is not seen in the "Accepted Encoding" property of the browser's HTTP Header, then GZIP compression should not be applied. (Similarly with DEFLATE). I would expect no compression to be applied if the browser does not have compression enabled/allowed.

 Nevertheless, I've attached an image showing that my instance of FireFox is currently anticipating gzip/deflate encoded streams.

Sean

0
Martin
Telerik team
answered on 20 Oct 2011, 04:53 PM
Hello Sean,

It is strange that you observe the issue in FF only. However I would suggest that you review your code and verify whether another type of compression is not enabled. Please also try to temporarily remove any code that changes the "Content-encoding" header of the response object. If none of these modifications work, I am afraid that I would need a runnable example that I could debug locally. This way I will be able to provide you with more to the point resolution.

Best wishes,
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
0
Sean
Top achievements
Rank 2
answered on 20 Oct 2011, 07:25 PM
Hi Martin,

So I did a bit of looking through the entire solution, and I found the culprit, but I don't understand why this is the culprit -- or how to make things play nicely together. Hopefully your expertise can shed more light on the issue.

We have the following class which is applied to methods which return an ActionResult:

public class CompressionFilterAttribute : ActionFilterAttribute
{
    public override void OnActionExecuting(ActionExecutingContext context)
    {
            HttpRequestBase request = context.HttpContext.Request;
 
            string acceptEncoding = request.Headers["Accept-Encoding"];
 
            if (string.IsNullOrEmpty(acceptEncoding))
                return;
 
            acceptEncoding = acceptEncoding.ToUpperInvariant();
 
            HttpResponseBase response = context.HttpContext.Response;
 
            if (acceptEncoding.Contains("GZIP"))
            {
                response.AppendHeader("Content-encoding", "gzip");
                response.Filter = new GZipStream(response.Filter, CompressionMode.Compress);
            }
            else if (acceptEncoding.Contains("DEFLATE"))
            {
                response.AppendHeader("Content-encoding", "deflate");
                response.Filter = new DeflateStream(response.Filter, CompressionMode.Compress);
            }
    }
}

It's not an option to remove this code... it would slow down the rest of our web application by a large factor -- and most of our web application does not use Telerik controls.

Is this a supported scenario?

EDIT: Oh, I got it. The problem was that there was double-encoding going on. I put the following code in to fix this issue:

if (!response.Headers.AllKeys.Contains("Content-encoding"))
{
 
This will check to see if the header has already been encoded (for my code). If it has ( by RadCompression ) then I won't put the header on again. This resolved the issue. Thanks for making me think of it!
Asked by
Sean
Top achievements
Rank 2
Answers by
Hus Damen
Top achievements
Rank 1
Sean
Top achievements
Rank 2
Martin
Telerik team
Share this question
or