Search

View Article

23

The first step is to download and install the HttpModule, to do this:-

  1. Obtain the http compression module from blowery.org.(you can just get binary only if you wish)
  2. Drop the binaries from the httpmodule into the bin directory of your site.
    • blowery.Web.HttpCompress.dll
    • blowery.Web.HttpCompress.dll.xml
    • ICSharpCode.SharpZipLib.dll
    • ICSharpCode.SharpZipLib.dll.xml
Pages: 1 of 3 Next Page
Posted in: DotNetNuke

Post Rating

Comments

Anonymous User
# Anonymous User
Wednesday, March 23, 2005 2:44 AM
I heard there were the odd probs in handling/saving viewstate? I've never figured out a way to quickly measure site speed, but it will be interesting to see how you go esp as I'm at WH4L too!
Nick
Anonymous User
# Anonymous User
Wednesday, March 23, 2005 3:06 AM
Interestingly enough, I am also working on a PageGenerated skin object to measure how long it takes to generate a page as well. Sometimes performance goes up and down.

The compression helps with sending the page down once it has been served. I haven't heard of problems with viewstate.
W. Todd Schwingle
# W. Todd Schwingle
Wednesday, March 23, 2005 11:35 AM
Scott,

Thanks for the instructions on how to install. I have installed it at one of my sites, and it appears to make the site that much snappier.

Thanks again.

Todd

Bruce Onder
# Bruce Onder
Friday, March 25, 2005 9:05 PM
Can anyone share actual page weight improvements, or even better, transfer rate improvements? :shades:

--Bruce
Scott McCulloch
# Scott McCulloch
Sunday, March 27, 2005 8:56 PM
This page went from about 50k to 8k
Roland Kern
# Roland Kern
Monday, March 28, 2005 1:43 AM
After the modification, the Web runs no more, it stops with a Application Error.

I pasted the few Lines in the Web.config (on the right position, i checked it), copied the 4 Files to the Bin directory of DNN, Result: App Error.

Any Ideas?

-Roland
Anonymous User
# Anonymous User
Monday, March 28, 2005 1:59 AM
is it compatiable withh dnn 2.1.2 as well ?
Roland Kern
# Roland Kern
Monday, March 28, 2005 2:11 AM
-> is it compatiable withh dnn 2.1.2 as well ?

It should, it's a Compression App for ASP.Net 1.1
Anonymous User
# Anonymous User
Monday, March 28, 2005 2:16 AM
Hi Roli -- did you put it ouside of the system.web area (i think you put it in the wrong place in web.config)
Anonymous User
# Anonymous User
Monday, March 28, 2005 2:31 AM
you can send it to me via a private message (smcculloch)
Roland Kern
# Roland Kern
Monday, March 28, 2005 2:38 AM
i pasted the 3 Lines etc just above

The second Part should be outside system.web, so i pasted the code just behind on the next line etc
Roland Kern
# Roland Kern
Monday, March 28, 2005 2:38 AM
jup
Anonymous User
# Anonymous User
Tuesday, March 29, 2005 5:05 PM
It's compatible with DNN 2.1.2, I use it on WWWCoder.com, and it does great with over 8000 users per day.
Anonymous User
# Anonymous User
Wednesday, March 30, 2005 5:40 PM
I found it does not work if you set it up prior to first run (possibly upgrade as well) with DNN3.0.12. It probably needs to exclude the /Install directory (too buzy/lazy to check)

However, it seems to work just fine after install
Anonymous User
# Anonymous User
Wednesday, March 30, 2005 5:41 PM
do we need to also add:




...

...

Anonymous User
# Anonymous User
Wednesday, March 30, 2005 5:43 PM
2nd try..
do we need to also add:

< system.web >
< httpModules >
< add name="CompressionModule" type="blowery.Web.HttpCompress.HttpModule, blowery.web.HttpCompress"/ >
< / httpModules >
< / system.web >
Anonymous User
# Anonymous User
Wednesday, March 30, 2005 5:44 PM
BTW, you do not need the XML files
Rodney Joyce
# Rodney Joyce
Thursday, March 31, 2005 4:43 AM
Nice article Scott!

Hmm - I have uploaded the .dlls into the bin, and changed the webconfig, but the load time and amount of bytes remains the same (according to http://www.websiteoptimization.com/services/analyze/ HTTP compression is NOT enabled - would this pick it up?)

So how do I tell if it is working? I installed your cool Page Generation Time skin object, but there was no change in the tests I did... I presume it will work on Webhost4Life?
Anonymous User
# Anonymous User
Thursday, March 31, 2005 4:54 AM
Page Generated is the amount of time the asp.net process takes to build a response.

The compression only kicks in when serving that request to the client (the job of IIS)
Rodney Joyce
# Rodney Joyce
Thursday, March 31, 2005 6:57 AM
I see - thanks. Should the tool http://www.websiteoptimization.com/services/analyze/
pick up the fact that comnpression is being used (it didn't when I ran it against http://www.dumbTV.com) - the size of data being sent to the client remained the same.

I remember enabling compression using IIS6 a while ago when I hosted at home and the size of data sent to the client was significantly reduced - is this the same thing? How do I tell if it is working (checked webconfig and bin and all is there)
Anonymous User
# Anonymous User
Saturday, April 2, 2005 6:36 AM
Anyone, anyone? How do you tell if it is on because I can't see a difference?
Scott McCulloch
# Scott McCulloch
Sunday, April 3, 2005 4:08 AM
I use FireFox to tell the difference, View Page Info
Rodney Joyce
# Rodney Joyce
Sunday, April 3, 2005 12:59 PM
Wow - thats cool! My source size went from 67k to 10k, and there is a noticable increase in speed in my site (http://www.dumbTV.com)!!!
I have saved the stats out of interest... Thanks Scott!
Anonymous User
# Anonymous User
Sunday, April 3, 2005 1:08 PM
Trivial Note: If you copy and paste this code in step 2:


remove the space at the end or it will fail : / > = />
Should save you 2 min ;)
Anonymous User
# Anonymous User
Wednesday, April 6, 2005 6:44 AM
It did save me a couple of minutes thanks;)
Anonymous User
# Anonymous User
Wednesday, April 6, 2005 12:49 PM
Are the steps described above used on DNN 2.1.2 as well?
Anonymous User
# Anonymous User
Tuesday, May 3, 2005 2:48 PM
Thanks for the clear instructions. This is nothing short of a miracle! The decrease in page load time on some of my websites are more than 50%. Most were reduced to below 8 seconds average. Very good news that the Blowery Compression Module has been included as a Sub-Project to Dotnetnuke.
Anonymous User
# Anonymous User
Thursday, June 16, 2005 6:58 AM
You really don't need this if your Windows 2003 with IIS 6.0
Anonymous User
# Anonymous User
Tuesday, June 21, 2005 10:11 PM
It cut down my page size from ~30 to ~8. About 75%. Awesome!
Anonymous User
# Anonymous User
Friday, June 24, 2005 6:09 AM
Quote: "You really don't need this if your Windows 2003 with IIS 6.0"

Can you explain why?
liorlustig liorlustig
# liorlustig liorlustig
Thursday, July 7, 2005 9:47 AM
I just tried it on a DNN 3.1 site and after uploading the files to the bin (version 6) and updating the web.config file, all I get when entering the site is a blank page. The site name is www.BuildPortal.com. I don't use Server.Transfer as much as I know.
Any help ?
My mail is inetinf at yahoo dot com

Anonymous User
# Anonymous User
Wednesday, July 20, 2005 4:09 AM
The preffered type of compression used should not be deflate but rather gzip. gzip is much better than deflate and it doesn't kill too much processor power.
Anonymous User
# Anonymous User
Wednesday, July 20, 2005 5:21 AM
This is probably the best settings to use
Cheers Taliesin :>~



















Anonymous User
# Anonymous User
Saturday, August 6, 2005 12:38 AM
Speed increase is amazing. Still, when user is logged-in as Admin or Moderator, speed increase is very low.
Also, Firefox is much speeder than IE.
Cary Fleming
# Cary Fleming
Tuesday, August 23, 2005 1:52 PM
Thanks for the info Scott! I added it to my server and had over 75% page size reductions on most pages.
Russel Stieb
# Russel Stieb
Tuesday, October 11, 2005 7:02 AM
Scott,
Does this do the same thing:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx

Just curious. Not sure if it's an option for "hosted sites", but if you're hosting your own, definitely worth a "look see"...

thanks,
Russel
Scott McCulloch
# Scott McCulloch
Wednesday, October 12, 2005 3:04 AM
Yep, same thing, only done in IIS
Anonymous User
# Anonymous User
Wednesday, October 12, 2005 7:21 AM
Scott, I read on the DNN forums that you felt given the choice between IIS compression and this module, it would be best to go with IIS Compression. Is this based on your knowledge of their workings or on real world tests?
Minh Tri TRUONG
# Minh Tri TRUONG
Thursday, October 13, 2005 5:42 AM
Hi Scott,
Thanks for the tutorial!
However, I am having some problem following it, of course I have google my problem, but nobody seems to have encounter it..... I have the following error:

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Security error.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Security error.]
blowery.Web.HttpCompress.DeflateFilter..ctor(Stream baseStream, CompressionLevels compressionLevel) +0
blowery.Web.HttpCompress.HttpModule.GetFilterForScheme(String[] schemes, Stream output, Settings prefs) +704
blowery.Web.HttpCompress.HttpModule.CompressContent(Object sender, EventArgs e) +479
System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87





Please , helps!

Below is my web.config (based on the dnn development.config):






























































































































































































































































































































































































Juan Schaffner
# Juan Schaffner
Saturday, October 15, 2005 10:57 AM
Hi, I was wondering if Blowery HTTP Compression can work together with IIS 6 HTTP compreession?

IF not, which would you recommend to use?

TIA
Juan Schaffner
Anonymous User
# Anonymous User
Monday, October 17, 2005 11:17 AM
It took me a couple tries to get the web config right, but once I did this is great.
60k became 17k on one site and 50k became 12k on another. Thanks a lot!
Dave A-W
# Dave A-W
Thursday, January 5, 2006 2:51 AM
Note, older versions of blowery.Web.HttpCompress.dll are not compatible with DNN4.X - they cause a conflict with the SharpZipLib used by the core File Manager page (and others)

If upgrading to DNN4, you can replace your DLL with the latest version up at
http://www.blowery.org/code/HttpCompressionModule.html
but be aware that it is beta.

Please comment if you try this and have any issues!
Anonymous User
# Anonymous User
Friday, January 6, 2006 3:05 PM
How can I use Blowery's http compression module in a medium trust environment?
Anonymous User
# Anonymous User
Tuesday, January 10, 2006 3:37 AM
Thanks a lot !!!
Working more than GREAT :-)

IZ.
www.izsurfing.com
Dave A-W
# Dave A-W
Friday, January 13, 2006 3:52 AM
Further to my recent comment on DNN4.x compatibility, you will also need to add the following into your web.config blowery.web section. In "excludedPaths" add the line



It seems that the compression is not compatible with .NET 2's script serving mechanism.
Anonymous User
# Anonymous User
Saturday, January 14, 2006 8:56 PM
I'm on DNN4 and download v6.0 for ASP.NET 2.0. As suggested above, I excluded the WebResource.axd path. I'm running in a medium trust environement and also had to add requirePermission="false" in the sectionGroup element to get things to work.

So things work ok except:

1) File Manager crashes due to zip. I fixed this by not installing the CSharpZipLib DLLs.

2) Update module settings is broken. When I click the "Update" link I get a JavaScript error:

'WebForm_PostBackOptions' is undefined.

I'm guessing that exclusing the WebResource.axd is supposed to fix this, but it does not appear to do so in my environment. :-(

Any other suggestions?

Thanks,
Bill
Anonymous User
# Anonymous User
Wednesday, January 18, 2006 9:29 AM
Didn't fix it for me either...
Anonymous User
# Anonymous User
Wednesday, January 18, 2006 11:25 AM
The fix is:


I had the same problem with the module update and therefore I looked in the source code and found this:

string realPath = app.Request.Path.Remove(0, app.Request.ApplicationPath.Length+1);
if (settings.IsExcludedPath(realPath))
{
// skip if the file path excludes compression
return;
}

Its seems that it removes one to many char from the path and therefore realPath ends up with "ebResource.axd"

I have kept the just to be sure.
Anonymous User
# Anonymous User
Wednesday, January 18, 2006 12:22 PM
ebResource.axd works! Thanks!
Anonymous User
# Anonymous User
Wednesday, January 18, 2006 3:45 PM
still didn't correct it for me.
Anonymous User
# Anonymous User
Thursday, January 19, 2006 6:45 PM
Well here's an interesting one. Using DNN 4 with compression and occasionaly I'm getting the wrong encoding which makes for some interesting characters rendered in the browser. What I expect and want is:


Electronic Drive and Controls


What I get sometimes on the first load in IE 6.0:


Electronic Drive and Controls


Notice the utf-8 vs. windows-1252

A realod make the windows-1252 go away, question is, why is there in the first place?
John
# John
Saturday, January 21, 2006 10:34 AM
When copying the files over, do I need to do it through file manager instead of FTP? It isn't working for me and I suspect that DNN hasn't registered the file since I just dumped them in via FTP.
Anonymous User
# Anonymous User
Tuesday, January 24, 2006 5:55 AM
Some more info on the utf-8 vs. windows-1252 problem. It looks like there are several bytes of garbage at the start of the page when windows-1252 encoded. As I said before, a page reload usually results in a utf-8 encoded page with no garbage bytes at the top.
Anonymous User
# Anonymous User
Tuesday, January 31, 2006 3:24 PM
I read this article very carefully but I can't get it working on websecurestores.

Is it possible that my hosting just doesn't allow this ?

I used DNN 4.0.2
and HttpCompress Version 6 for .NET 2.0
I uploaded the blowery.Web.HttpCompress.dll directly by ftp

I get the following message:
The application attempted to perform an operation not allowed by the security policy.

Does anyone know what causes this error ?

(Full error:
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +65
Anonymous User
# Anonymous User
Friday, February 10, 2006 8:52 PM
I am unable to publish my site. I get 3 errors:
'ZipInputStream' is ambiguous in the namespace 'ICSharpCode.SharpZipLib.Zip'.

'ZipEntry' is ambiguous in the namespace 'ICSharpCode.SharpZipLib.Zip'.

'ZipInputStream' is ambiguous in the namespace 'ICSharpCode.SharpZipLib.Zip'.


any ideas?
Anonymous User
# Anonymous User
Thursday, March 9, 2006 2:05 AM
Hello ewery body!

When I click the "Update" link I get a JavaScript error:

'WebForm_PostBackOptions' is undefined.

ebResource.axd - didn't correct it for me.
WebResource.axd - didn't correct it for me.

Any other suggestions?
Anonymous User
# Anonymous User
Thursday, March 9, 2006 6:43 AM
Make sure that you clear your browser cache when including / excluding files like WebResource.axd from the compression.

Otherwise your browser might just be loading the broken WebResource.axd from the browser cache!
Curt Curt
# Curt Curt
Monday, March 13, 2006 9:33 PM
Like others, my File Manager still gets an error with:



I’ve also cleared my cache.

When I delete the following from my bin folder:
ICSharpCode.SharpZipLib.dll
ICSharpCode.SharpZipLib.xml
Then the File Manager works again.

How necessary are these two files? What do they do? Without these two files in the bin folder, is there still compression going on?
Curt Curt
# Curt Curt
Monday, March 13, 2006 9:42 PM
I copied and pasted my "search engine friendly" URLs to this analyzer:
http://www.websiteoptimization.com/services/analyze/index.html
to test the speed and page sizes. However, it reported the same speed and sizes for all the pages I tested (Home, Calendar, Forum) with and without the compression.

What am I doing wrong?

(
Sowmitri
Thursday, July 13, 2006 10:22 AM
Iam getiiing one error "persistent type cookie requires a module id" while adding the custom module, can anybody help regarding this, Thanx in advance!!
Bruce Parr
# Bruce Parr
Tuesday, July 25, 2006 12:08 PM
We had implemented HTTP compression on a customer hosted site, then we encountered something rather interesting.

We are using DNN 3.1.1, and Telerik RADCombo using LoadOnDemand. We had successfully implemented LoadOnDemand on our machines, and on several test sites. This particular customer's site, however, would not run the RADCombo in LoadOnDemand mode, and kept returning a javascript error "RadComboArrayLoadOnDemand not found" or something similar.

After spending 2 days trying to figure this out, we turned of HTTP compression and it fired right up.

If anyone can give some insight as to why this would happen and if there is any kind of workaround, we would appreciate it.

Thanks,
B
dan
# dan
Thursday, September 7, 2006 6:25 PM
works beautifully :)
Brayan Plazas
# Brayan Plazas
Monday, September 17, 2007 8:52 AM
Hi.

I'm used to the HttpCompressionModule.

When I'm access to my site generated the following error..

An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.


BC30560: 'ZipFile' spanish description



Line 138: Dim tempFile As String = Null.NullString
Line 139: Dim manifestData As Byte() = Nothing
Line 140: Dim packageZip As ZipFile = Nothing
Line 141: Try
Line 142: If HttpContext.Current Is Nothing Then

Anyone ideas

Thanks

Avinash
# Avinash
Tuesday, May 5, 2009 4:59 AM
Hi I am using DNN 5, I think HTTPCompression is inbuilt in this version.

How to enable this using web.config?

Please reply me.


thanks
Scott McCulloch
# Scott McCulloch
Tuesday, May 5, 2009 8:03 AM
It's set in host -> host settings
Avinash
# Avinash
Tuesday, May 5, 2009 10:43 PM
Hi thanks Scott.

Can you give me details please?

or any website for reference...

Post Comment

Only registered users may post comments.