RadCompression - exclue certain files?

7 posts, 0 answers
  1. SamVanity
    SamVanity avatar
    154 posts
    Member since:
    Apr 2006

    Posted 19 Feb 2009 Link to this post

    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...
  2. Bruno
    Bruno avatar
    105 posts
    Member since:
    Mar 2008

    Posted 20 Feb 2009 Link to this post

    Sam,

    I think you can exclude a page, not a single file.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SamVanity
    SamVanity avatar
    154 posts
    Member since:
    Apr 2006

    Posted 20 Feb 2009 Link to this post

    May I ask how you can exclude a page?

    And what is the difference between  a page and  a file?
  5. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 23 Feb 2009 Link to this post

    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.
  6. Clayton
    Clayton avatar
    47 posts
    Member since:
    Nov 2009

    Posted 01 Aug 2010 Link to this post

    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

  7. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 05 Mar 2012 Link to this post

    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/
  8. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 05 Mar 2012 Link to this post

    Sorry, doublepost.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017