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

RadCompression TroubleShoot

15 Answers 251 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 05 Nov 2009, 11:30 AM
Hi,

I have radscriptmanager + radcompression combining and zipping up resources tremendously well on my dev environment.

Yet despite painstakingly checking web.config / code, only the combine (not compression) works on my test server. 

Obviously something is amiss, but do you have any ideas (IIS 7 settings?) what could be stopping this as sure code is synced and struggling to see where to look.

Thanks
Matt

15 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 06 Nov 2009, 12:15 PM
Hello Matthew Waring,

There was a problem we recently fixed causing compression to be disabled at random. I suggest you upgrade to the current official release to see if it helps.

Regards,
Albert,
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
Matt
Top achievements
Rank 1
answered on 07 Nov 2009, 02:45 PM
Hi Albert!

Tried Q3 2009, looked like it worked for 1st post! then on subsequent did not work?????

Even worse, I have just come out of a 4 hr tailspin trying to find a new bug whereby a textbox/button click event was no longer firing!!!!!!!!

Guess what? turning off radcompession solved this error!!!

Have you any idea why this is happening & whether I can do the same thing with IIS7 built in compression as I no londer trust this component :(

Regards
Matt

0
Sebastian
Telerik team
answered on 10 Nov 2009, 01:29 PM
Hello Matthew,

I am sorry to hear that you are having difficult time working with our RadCompression module. We are doing our best to address any reported issues that are confirmed by our Support Staff/QA engineers. However, there is always a possibility that an issue or a bug can slip through our test engine and get into production code.

That is why I suggest you isolate a working case (using v2009.3.1103 of the suite) which illustrates the abnormality and send it enclosed to a standard support ticket. We will examine your code/debug the sample locally and will get back to you with our findings.

The IIS7 built-in compression can be an alternative to RadCompression.

Kind regards,
Sebastian
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
Matt
Top achievements
Rank 1
answered on 10 Nov 2009, 01:48 PM
Hi,

I will try at some point to isolate this, but as It seems almost random, not sure how to do so.

In the meantime, if a fix is placed in an intermeditate build I can try can you please post to this thread so I can pick up on it.

I am just dissappointed as Rcomp would have really finalised my remaining issues for our production server :(

Thanks
0
Sebastian
Telerik team
answered on 10 Nov 2009, 04:19 PM
Hello Matthew,

Unfortunately we are not able to confirm your observation as an issue since we do not have a test case which illustrates it. We tried to recreate it locally but to no avail. If you can isolate the problem, feel free to submit it to us and we will do everything possible to provide straight-to-the-point explanation/solution.

Kind regards,
Sebastian
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
Matt
Top achievements
Rank 1
answered on 02 Dec 2009, 10:00 AM
Hi Sebastian,

Yeh appreciate the need for repeat test case, but could you help me out with some guidelines of how I can troubleshoot this to narrow down causes.  I really want this to work as it will reduce my payload massively.

1.  Need to find out why its stopping postback on certain pages, I assume it could be my jquery conflicting somehow? could this be the case?

NEW: Just noticed this IMPORTANT INFO.

http://localhost/pi40/default.aspx - works fine on postback fro click/enter ETC..
http://localhost/pi40/ - does not work as above.

Does this help?

Also, I do employ some url rewriting for seo, but obviously have no clue as to how this could affect radcompresson?? any ideas.
I use this scott gu? code for helping with css paths and the like + IISAPI REWRITE by helicon, its worked for years.

---

 
Imports Microsoft.VisualBasic  
 
Public Class FormRewriterControlAdapter  
    Inherits System.Web.UI.Adapters.ControlAdapter  
 
    Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)  
        MyBase.Render(New RewriteFormHtmlTextWriter(writer))  
    End Sub 
 
End Class 
 
Public Class RewriteFormHtmlTextWriter  
    Inherits HtmlTextWriter  
 
    Sub New(ByVal writer As HtmlTextWriter)  
        MyBase.New(writer)  
        Me.InnerWriter = writer.InnerWriter  
    End Sub 
 
    Sub New(ByVal writer As System.IO.TextWriter)  
        MyBase.New(writer)  
        MyBase.InnerWriter = writer  
    End Sub 
 
    Public Overrides Sub WriteAttribute(ByVal name As StringByVal value As StringByVal fEncode As Boolean)  
 
        ' If the attribute we are writing is the "action" attribute, and we are not on a sub-control,   
        ' then replace the value to write with the raw URL of the request - which ensures that we'll  
        ' preserve the PathInfo value on postback scenarios  
 
        If (name = "action"Then 
 
            Dim Context As HttpContext  
            Context = HttpContext.Current  
 
            If Context.Items("ActionAlreadyWritten"Is Nothing Then 
 
                ' Because we are using the UrlRewriting.net HttpModule, we will use the   
                ' Request.RawUrl property within ASP.NET to retrieve the origional URL  
                ' before it was re-written.  You'll want to change the line of code below  
                ' if you use a different URL rewriting implementation.  
 
                ' local iis with rewrite is now the required solution  
                value = Context.Request.ServerVariables("HTTP_X_REWRITE_URL")  
 
                'If HttpContext.Current.Request.Url.Host.ToLower() = "localhost" And Global.TestSite() Then  
 
                '    value = Context.Request.RawUrl  
                'Else  
                '    ' live  
                '    value = Context.Request.ServerVariables("HTTP_X_REWRITE_URL")  
                'End If  
 
 
 
                ' Indicate that we've already rewritten the <form>'s action attribute to prevent  
                ' us from rewriting a sub-control under the <form> control  
 
                Context.Items("ActionAlreadyWritten") = True 
 
            End If 
 
        End If 
 
        MyBase.WriteAttribute(name, value, fEncode)  
 
    End Sub 
 
End Class 

 

 


---

2.  Then find out why it works on dev but not production/test server?

i.e. How can I step through the code debug js/.net to help isolate the issue.

I will try to strip down my code to the bare minimum and create a test solution, but there is a lot of working parts :(

Thanks
Matt

 

0
Sebastian
Telerik team
answered on 04 Dec 2009, 12:33 PM
Hello Matthew,

Unfortunately from the provided details I am still not able to trace the core of the abnormality or provide suggestions what is causing it/how to fix it.

Does disabling the url rewriter module or replacing RadScriptManager with regular MS ScriptManager fixes the erroneous behavior? You may also compare the behavior between ajax requests and plain postbacks disabling the ajax in your app and setting enablePostbackCompression = true for RadCompression as explained here.

Also using the regular .NET code debugging techniques to follow the execution of your code and pinpoint the place when the issue occurs is something you can consider. Fiddler is a web debugging tool that can help you monitor the traffic between the client and your production server.

Best regards,
Sebastian
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
Matt
Top achievements
Rank 1
answered on 04 Dec 2009, 02:17 PM

Hi Sebastian,

Better news, It 'looks like' it is definetly the formrewriter.vb conflicting here with radcompression (and only this root url, i.e. /pi40/ not /pi40/default.aspx)! no idea why.  Commenting out the xml in the form.browser xml file makes it post back ok no problem.

I got it from this article - http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

We use ISAPIRewrite and IIS7.

fyi: RAD vs MSScriptManager makes no difference.

Could you please install this into your environment and see how radcompression is working with it? hope we can get to the bottom of it.

 

Many Thanks
Matt 

 

0
Sebastian
Telerik team
answered on 09 Dec 2009, 06:02 PM
Hello Matthew,

Does making an internal redirect call somehow from /pi40/ to /pi40/default.aspx addresses the abnormality? If this does not help, please let me know and I will continue with the investigation of the ISAPIRewrite module and will get back to you with my findings.

Kind regards,
Sebastian
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
Michael
Top achievements
Rank 1
answered on 15 Dec 2010, 12:56 PM
Hi to all,

I found a solution with the problem above.

Precondition:
- Developing with ASP.NET 4.0
- Using RadCompression Module
- Call the default page (Ex. www.contoso.com , not www.contoso.com/default.aspx) without specify page.

In the ASP.NET 4.0 one important change is that if you call the default page without specify page it set the attribute ACTION for the tag FORM to be empty (Ex. <form action="" ... />); instead if you specify page like default.aspx the engine set attribute with the relative path of page specified (Ex. <form action="default.aspx" ... />).

What happen is an incapacity for the modules to access to page properties: viewstate,form variables,etc.  (for more detail read this http://jai-on-asp.blogspot.com/2010/06/changes-and-differences-between-aspnet.html at paragraph "Event Handlers Might Not Be Not Raised in a Default Document in IIS 7 or IIS 7.5 Integrated Mode"

So, the solution for me is to set Page.Form.Action = "Default.aspx" in page init event only for the default page.

Have a nice xmas!
Michael Sogos
0
Sebastian
Telerik team
answered on 16 Dec 2010, 11:10 AM
Glad to find out that you come up with a solution, Michael - thanks for sharing it in this public forum post. Your Telerik points have been updated for the involvement.

Happy holidays,
Sebastian
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Tangium
Top achievements
Rank 1
answered on 23 Mar 2011, 09:45 PM
Just spent over 2 hours trying to resolve this same problem of events not firing until finally found this post on another site:

http://stackoverflow.com/questions/3978911/asp-net-webpage-defaultdocument-button-click-not-firing

Then I found this page/fix (Thank you!) however have disabled RadCompression completely instead.

To Telerik: If this problem was highlighted somewhere, I missed it. The Telerik Configuration box didn't show any alert/FYI about this critical problem using RadCompression which would've prevented all these lost hours by your customers!
0
Iana Tsolova
Telerik team
answered on 29 Mar 2011, 02:21 PM
Hi Scush,

Indeed, you are right that this issue is not documented, we will add it shortly.
However, you should know that the problem is caused by this breaking change in .Net 4.0. You can workaround it by setting precondition="managedHandler" for the RadCompression module. Note that you may also need to remove the runAllManagedModulesForAllRequests setting from your web.config if you have it (or set it to false).

I hope this helps.

Kind regards,
Iana
the Telerik team
0
Bryan Brannon
Top achievements
Rank 2
answered on 22 Jul 2011, 09:35 PM
Iana,

Does this affect the performance of the RadCompression module by setting: precondition="managedHandler" from integratedMode?

Otherwise, I could just add this as suggested below:
     Page.Form.Action = "Default.aspx"

Thanks in advanced.
0
Pavel
Telerik team
answered on 26 Jul 2011, 09:35 AM
Hi Bryan,

Generally there is no difference between the two approaches performance-wise. However the preCondition solution might be better as it is more centralized and easier to modify.

Regards,
Pavel
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ScriptManager and StyleSheetManager
Asked by
Matt
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Matt
Top achievements
Rank 1
Sebastian
Telerik team
Michael
Top achievements
Rank 1
Tangium
Top achievements
Rank 1
Iana Tsolova
Telerik team
Bryan Brannon
Top achievements
Rank 2
Pavel
Telerik team
Share this question
or