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

[Solved] RadWindow doesn't work with GZIP compression.

4 Answers 193 Views
Window
This is a migrated thread and some comments may be shown as answers.
Grzesiek
Top achievements
Rank 2
Iron
Grzesiek asked on 29 Sep 2009, 02:07 PM
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?


4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 30 Sep 2009, 11:17 AM
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.
0
Grzesiek
Top achievements
Rank 2
Iron
answered on 30 Sep 2009, 11:50 AM
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.




0
Georgi Tunev
Telerik team
answered on 30 Sep 2009, 12:26 PM
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.
0
Grzesiek
Top achievements
Rank 2
Iron
answered on 30 Sep 2009, 12:34 PM
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>  



Tags
Window
Asked by
Grzesiek
Top achievements
Rank 2
Iron
Answers by
Georgi Tunev
Telerik team
Grzesiek
Top achievements
Rank 2
Iron
Share this question
or