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

RadCompression - exclue certain files?

6 Answers 151 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
SamVanity
Top achievements
Rank 2
SamVanity asked on 19 Feb 2009, 12:53 PM
I am using RadCompression but run into problems when I use an axd file to deliver a file (a file download handler). The RadCompression feature always compress this handler and corrupts the file. Is there a way we can configure the behavior of the RadCompression engine in the web.config file. e.g.:

    <Telerik> 
        <RadCompression compressionType="GZip"
            <IncludedMimeTypes> 
                <add mime="text/html" /> 
            </IncludedMimeTypes> 
            <!--<ExcludedMimeTypes> 
                <add mime="text/html" /> 
              </ExcludedMimeTypes>--> 
            <ExcludedPaths> 
                <add path="~/download.axd" /> 
            </ExcludedPaths> 
        </RadCompression> 
    </Telerik> 

Without this capability, I believe this will break many scripts.

UPDATE: it seems to be Firefox 3 specific issue...

6 Answers, 1 is accepted

Sort by
0
Bruno
Top achievements
Rank 2
answered on 20 Feb 2009, 05:03 PM
Sam,

I think you can exclude a page, not a single file.
0
SamVanity
Top achievements
Rank 2
answered on 20 Feb 2009, 08:02 PM
May I ask how you can exclude a page?

And what is the difference between  a page and  a file?
0
Daniel
Telerik team
answered on 23 Feb 2009, 07:34 AM
Hello Sam,

You can exclude a page using the RadCompressionSettings attribute.

C#
[RadCompressionSettings(HttpCompression = CompressionType.None)] 
public partial class _Default : System.Web.UI.Page 
    ... 

VB
<RadCompressionSettings(HttpCompression := CompressionType.None)> _ 
Public Partial Class _Default 
    Inherits System.Web.UI.Page 
    '...  
End Class 

Hope this helps.

Sincerely yours,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Clayton
Top achievements
Rank 1
answered on 01 Aug 2010, 06:49 PM

Sam,

Did you ever find a workaround for excluding a handler/file from radcompression? I'm experiencing this exact same issue on Firefox 3 also.

Thanks!

EDIT: Alright, so after refining my google search some more, I came across this page, which seems to provide a solution, however I cannot figure out where in the web.config to place this:

<radCompression>  
  <excludeHandlers>
       <!--This will match only the defaultcs.aspx file inside a grid folder in web site’root-->
       <add handlerPath="grid/defaultcs.aspx" matchExact="true"/>
       <!--This will match every defaultvb.aspx file regardless of its location in the web site-->
       <add handlerPath="defaultvb.aspx" matchExact="false"/> 
       <!--This will match the handlers of all pages which reside in the MyFolder sub-folder of the web site--> 
       <add path="MyFolder/" matchExact="false"/>
  </excludeHandlers>
</radCompression>

http://www.telerik.com/help/aspnet-ajax/radcompression.html

0
msigman
Top achievements
Rank 2
answered on 05 Mar 2012, 09:44 PM
Clayton,

I've researched this issue and provided a fix that I've personally verified.  Please see the blog post here:

http://www.msigman.com/2012/03/telerik-radcompression-tinymce-spellchecker/
0
msigman
Top achievements
Rank 2
answered on 05 Mar 2012, 09:44 PM
Sorry, doublepost.
Tags
Ajax
Asked by
SamVanity
Top achievements
Rank 2
Answers by
Bruno
Top achievements
Rank 2
SamVanity
Top achievements
Rank 2
Daniel
Telerik team
Clayton
Top achievements
Rank 1
msigman
Top achievements
Rank 2
Share this question
or