RadWindow doesn't work with GZIP compression.

5 posts, 0 answers
  1. Grzesiek
    Grzesiek avatar
    94 posts
    Member since:
    Jun 2007

    Posted 29 Sep 2009 Link to this post

    Hello!

    I don't know what's going on, because when I initiate RadWindow control, it has been working some time.

    Suddendly the window won't show up. I turn off compression and it shown up.

    The most interesting is that, when I turn on the compression it worked again some time and die.

    In global.asax I have the following code:

     Dim app As HttpApplication = TryCast(sender, HttpApplication) 
                Dim acceptEncoding As String = app.Request.Headers("Accept-Encoding"
                Dim prevUncompressedStream As Stream = app.Response.Filter 
     
                If Not (TypeOf app.Context.CurrentHandler Is Page) OrElse app.Request("HTTP_X_MICROSOFTAJAX") IsNot Nothing Then 
                    Return 
                End If 
     
                If String.IsNullOrEmpty(acceptEncoding) OrElse acceptEncoding.Length = 0 Then 
                    Return 
                End If 
     
                acceptEncoding = acceptEncoding.ToLower() 
     
                If acceptEncoding.Contains("deflate"OrElse acceptEncoding = "*" Then 
                    ' defalte 
                    app.Response.Filter = New DeflateStream(prevUncompressedStream, CompressionMode.Compress) 
                    app.Response.AppendHeader("Content-Encoding""deflate"
                ElseIf acceptEncoding.Contains("gzip"Then 
                    ' gzip 
                    app.Response.Filter = New GZipStream(prevUncompressedStream, CompressionMode.Compress) 
                    app.Response.AppendHeader("Content-Encoding""gzip"
                End If 

    Anyone can help me?


  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 30 Sep 2009 Link to this post

    Hi Grzesiek,

    To be able to help we need to have a better view over your exact setup and the problem itself. Please open a support ticket and send us a small sample project where this issue could be reproduced - we will check it right away and do our best to help.


    All the best,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Grzesiek
    Grzesiek avatar
    94 posts
    Member since:
    Jun 2007

    Posted 30 Sep 2009 Link to this post

    I searched here through all forums and I found similar problem:

    http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/httpcomression.aspx#956924

    I think that excluding the Telerik.Web.UI.WebResource.axd from the custom compression can help me, but how do this?


    If this won't work (excluding) I will send simple project.




  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 30 Sep 2009 Link to this post

    Hello Grzesiek,

    I believe that the following blog post from Rick Strahl (check the comments as well) will be of help:
    http://www.west-wind.com/Weblog/posts/10564.aspx

    All the best,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Grzesiek
    Grzesiek avatar
    94 posts
    Member since:
    Jun 2007

    Posted 30 Sep 2009 Link to this post

    I've found the problem.

    I have a comment in my javascript function that open RadWindow after click the image:
    <script type="text/javascript"
        function ShowPow() { 
            //Comment here 
            window.radopen(null"RW1"); 
        } 
    </script> 

    With FireBug helper I recognize that after white space removing (which I also have) I have:

    <script type="text/javascript">    function ShowPow() {//Comment here window.radopen(null, "RW1");   }</script> 

    Delete comment help and now everything works fine :-)

    <script type="text/javascript">    function ShowPow() { window.radopen(null"RW1");   }</script>  



Back to Top