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

RadCompression combined with Blowery HTTP Compression

3 Answers 196 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 25 Feb 2009, 04:21 AM
Hi,

I have a website which i have added Blowery HTTPCompression to. This is a HTTPModule and will compress all the aspx, css and js files which are served up. It works very well with no problems. However it of course does not compress PageMethods JSON responses, for this i have tried to add the RadCompression HTTP Module to the site.

As soon as i have both modules added to the web config the session state breaks. For example i load the website up and at the first line instance where the Session is accessed an exception is thrown with the text below:

-------------------------------------------------------------------------------
System.Web.HttpException was unhandled by user code
  Message="Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\\<system.web>\\<httpModules> section in the application configuration."
  Source="System.Web"
  ErrorCode=-2147467259
  StackTrace:
       at System.Web.UI.Page.get_Session()
       at System.Web.UI.UserControl.get_Session()
       at Master.Page_Load(Object sender, EventArgs e) in c:\UKWrap\UI\RePublic\Master.master.cs:line 194
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

-------------------------------------------------------------------------------

Now if i run the site with only the RadCompression HTTP Module added then this error does not occur and the JSON responses from the PageMethods are compresed, BUT none of the standard .aspx, .css, and .js files are compressed.

And if i run the site with ONLY the Blowery HTTP Module added and not the RadCompression, then the site run and all the .aspx, .css, and .js responses are correctly compressed HOWEVER the JSON page method responses are not compressed.

Is RadCompression not compatible with other compression modules? And if not then why does it not seem to support compressing the .aspx, .css, .js files? If there is a way to use RAD compression to completely replace Blowery HTTP compression please let me know. I have read that RadCompression does not support IE6, if this is the case then it is going to be useless as a replacement for Blowery and i will need the two of them both running as HTTP modules.

Any ideas?

Thanks,

Paul

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 27 Feb 2009, 06:35 PM
Hi Paul,

Can you please provide your Blowery configuration? Also you may try latest internal build as the compression module have various modification applied.  RadCompression do not support IE6 due to the fact that some version of IE6 do not support compression.

As to the compression of css and js files you may use our RadScriptManager and RadStyleManager controls.

Regards,
Rosen
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
Paul
Top achievements
Rank 1
answered on 02 Mar 2009, 12:56 AM
Hi Rosen,

The blowery configuration i use is the following:

<

blowery.web>

 

    <

httpCompress preferredAlgorithm="gzip" compressionLevel="high">

 

        <

excludedMimeTypes>

 

            <

add type="image/jpeg"/>

 

            <

add type="image/png"/>

 

            <

add type="image/gif"/>

 

 

 

 

        </

excludedMimeTypes>

 

        <

excludedPaths>

 

            <

add path="NoCompress.aspx"/>

 

            <

add path="WebResource.axd"/>

 

            <

add path="ScriptResource.axd"/>

 

        </

excludedPaths>

 

    </

httpCompress>

 

</

blowery.web>

----------------------------------------------------

I have tried switching on Forced compression using both the RadScriptManager and the RadStyleSheetManager but still none of the .css and .js files are compressed. Does any Rad component support compressing the standard response from the .aspx request? Or do your module purely focus on the styles and the scripts?

Thanks,

Paul

 

0
Rosen
Telerik team
answered on 05 Mar 2009, 08:44 AM
Hi Paul,

The RadScriptManager and RadStyleSheetManager will combine and compress css and js file only when they are set as embedded resources, for example all RadControls for ASP.NET AJAX controls' resources.

As to the blowery compression, I was unable to recreate exact behavior you have described, however I have noticed that applying both compression modules will cause double compression on ajax calls. Thus I suggest you to consider using only one of the module at a time.

All the best,
Rosen
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.
Tags
Ajax
Asked by
Paul
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Paul
Top achievements
Rank 1
Share this question
or