 |

|
Hi,
I have tried to use the Http Compression module, I have got the following message: The name 'context_PostReleaseRequestState' does not exist in the current context. Despite the fact, I did add a reference to the assembly!
I will appreciate any help!
Cheers,
|
|
|
|

|
Downloaded your code and added dll, I am getting errorors like below:
Unrecognized configuration section Flanders.
Even the downloaded code is with bugs..
|
|
|
|
|

|
I disnt get you my dear..
|
|
|
|

|
Read the post above and create your configuration section in your .config file
|
|
|
|

|
Thanks for the replies....Even I did the same...
I copied the codes for web.config and I downloaded the code of httpcompress, created a build and added to my project.
Still, its saying unrecognized format "Flanders".
Please help me in acheiving this GZip.
Regards,
Sanjai
|
|
|
|
|

|
RTFM
<configuration>
<configsections>
<sectiongroup name="Flanders">
<section name="HttpCompress">
type="Flanders.Library.Modules.HttpCompress.
Configuration, HttpCompress"/>
</section></sectiongroup>
</configsections>
<flanders>
<httpcompress compressiontype="GZip">
<excludedpaths>
<add path="NoCompression.aspx" />
</excludedpaths>
<excludedmimetypes>
<add mime="image/jpeg" />
</excludedmimetypes>
</httpcompress>
</flanders>
<system.web>
<httpmodules>
<add name="HttpCompressModule">
type="Flanders.Library.Modules.HttpCompress.
HttpModule,HttpCompress"/>
</add></httpmodules>
</system.web>
</configuration>
|
|
|
|

|
I Included that one also.
I am getting the below error:
Could not load type 'Flanders.Library.Modules.HttpCompress.
HttpModule' from assembly 'HttpCompress'.
|
|
|
|

|
can you run the provided sample project ?
did you compile my code in its own assembly or did you add it to an assembly with a different name?
The code should work because I've put this version in production on some websites that do get a reasonable amount of traffic.
|
|
|
|

|
This is what i did...
1. Downloaded your code..
2. Compiled your code and rectified few bugs to make build success
3. I added this reference to my project
4. I copied the config code from the site
Now am getting that error. Seems the dll is not proper.
Can you mail me the dll's by zip.
Thanks in anticipation!
My mail id: Prasad_Rambabu@satyam.com
|
|
|
|

|
I've sent it
For me they compiled without warnings or errors and without having to change the code.
|
|
|
|

|
I cannot send it to you it seems
This is an automatically generated Delivery Status Notification
Delivery to the following recipient failed permanently:
Prasad_Rambabu@satyam.com
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 Default Blocking Message (state 18).
|
|
|
|

|
I am very sorry, I didnt get the mail fro you!
Can you please re send it..
The downloaded code is with few bugs and I excluded the Default.aspx page from the appn.
and then build succeeded.
Thanks ...
|
|
|
|
|

|
Thanks for the replies my dear.. Finally every thing is working fine.. But the images, stylesheets and Javascripts are not working since the httpcompresser is compressing these files also.
How can I avoid this?
Sanjai
|
|
|
|
|

|
Can you please respond...!
I am getting the below error:
Error: The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
I am excluding the Images, css files in this manner:
<ExcludedPaths>
<add path="idsp_login.aspx"/>
<add path="idsp_home.aspx"/>
<add path="App_Themes\Stylesheet.css"/>
<add path="App_Themes\Styles.css"/>
<add path="Images\*.jpg"/>
<add path="web.sitemap"/>
<add path="App_Code\*"/>
</ExcludedPaths>
<ExcludedMimeTypes>
<add mime="App_Themes\Stylesheet.css"/>
<add mime="Images\jpg"/>
</ExcludedMimeTypes>
Regards,
Prasad.
|
|
|
|

|
you must be an Indian guy. It seems in india people prefer google more than their brain
|
|
|
|

|
Dude,
For Google also u need brain.. which others might lack in it..
Better be careful before commenting on Indians...
:P
Regards,
Smart Boy
Mumbai,
(INDIA)
|
|
|
|

|
Hi firstly thanks for usefull code, i tried to use your DLL with ajax tool kit, but it creates problem.
Sys.Web.Forms.PageRequestManagerParser.ErrorException: The message received from server could not be parsed. Common causes for this error are when the response is modified by cals to Response.Write(), response filters HttpModules or server trace is enabled
Details Error parsing near '/table>|html'
|
|
|
|

|
The scripts in WebResource.axd not work when using the Compress module.
I've tried excluding the path WebResource.axd from the compression configuration, but it's no help.
Anyway to work around this?
|
|
|
|

|
I love your control but now my Substituion Control and Response.WriteSubstitution do not work - it continues to cache the whole page and the code in aspx is not that the MethodName refers to is not executed.
|
|
|
|

|
I'm sorry but I have completely no idea what you are talking about.
Where does the substitution control come from an where do you get Response.WriteSubstition ?
Is that from the control tookit maybe ?
|
|
|
|

|
Its called Post Cache Substituion - http://quickstarts.asp.net/QuickStartv20/aspnet/doc/caching/output.aspx#postcache[^
It allows you to cache a page or control but still keep one portion of the page dynamic. When using the HTTPCompress, it doesn't execute the page/control code for the dynamic portion of the page it simply caches the whole page. What I have done for now is excluded the pages that use it for now.
|
|
|
|

|
Hi,
I'm new here and I have a problem with httpcompress. I used it in an ASP 2.0 .NET Project and first it seems to work really fine. But now, after execute an postback event, a Focus()-method doesn't work correctly. So, after leaving a textbox the focus doesn't go to the desired control and the browser signs an error.....sorry for my english and thanks for an answer!
Helmut
|
|
|
|

|
Hi Helmut
Try adding webresource.axd to the excluded paths that should fix the problem
|
|
|
|

|
Thanks very much for your answer,
now everything is o.k.!!!!!!!!!
|
|
|
|

|
Hello,
I have a question. I knew that we can compress asp.net pages while sending to the client, but I don't know how can compress it agian while posting back to the server from client. any Idea?
Thanks in advance...
|
|
|
|

|
you can't.
The compression takes place on the server this means that we can compress everything from there. When you postback it shoould send back the compressed data to the server because it is already compressed when it was received (I haven't tested it though)
|
|
|
|

|
I noticed (thru tracing and httplook) that when using the cassini build in webserver with VS2005 that all requests (aspx, css, js) are processed and compressed, but when I run the site on IIS 6.0 it only compresses the aspx files not the css and js. After looking at this I realised that IIS is not configured to pass requests for css and js to the .net pipeline. Is there any way around this or am I missing something.
|
|
|
|

|
map them in your web.config to the aspx handler
|
|
|
|
|

|
I use the WebDevHelper BHO from nikhil kothari http://www.nikhilk.net
Another option would be to use fiddler
|
|
|
|

|
Any chance of making it work in Medium trust config?
Thanks!
David
|
|
|
|

|
Thanks for the cool article and code!
I too am having problems with javascript errors (specifically the framework 'WebForm' modules).
Have tried excluding text/javascript but doesn't help.
Shame. Here's hoping you get a chance to resolve this
Cheers
Rich
|
|
|
|
|

|
But for me, it's still not working. I had to manually exclude WebResource.axd, ie. .
|
|
|
|

|
I see the excluded node in the web.config and was wondering why anything should not be gzip-ed ?
============================
If you make it idiot-proof, they'll make a better idiot
|
|
|
|

|
I can think of several filetypes that you'd want to exclude.
All multimedia files that are : images, videofiles, and flash movies....
The reason for this would be that most of these mimes are already in a highly compressed format and they will slow your site down when zipped, while not getting any considerable gain in bandwith preservation.
|
|
|
|

|
Not sure why.. can't get it to work in IE... seems to take issue with .js files... (client errors "invalid characters")
However, works fine in Firefox.
Neither browser shows "content encoding.. gzip" in the Response headers section of trace, per your above screenshot.
Are the .js files even supposed to be processed?
Does the handle wild cards, directory paths, or just file names?
It works on the first load but fails on following loads.
I appreciate your work and any help on this!
David
|
|
|
|

|
Hi David,
I checked your comments out and I must admit that there are some problems with the js and css handling.
I've noticed for instance that when you have a freetextbox control on your page it also won't display completely with the handlers at that moment.
For now it just handles filepaths on a per file basis. I don't have time during the week to continue and work on this module I will have to wait untill the weekend to add the improved path handling and work out the js issue. (You could try excluding the mime type text/javascript and setting the type in your <script src="..." type="text/javascript" >. Although I haven't had the chance to properly test it all out again.
Yep the trace doesn't show anything because I removed the trace lines form the code That could be an explanation for not showing up in the trace.
I hope that this weekend I can find some time to improve this library so it handles everything completely. If anyone makes an updat could you please let me know : koolkraftATgmailDOTcom
|
|
|
|

|
Hi,
I've updated the code which you can download on my blog. It should work now.
The article will be updated shortly as well to have the right code here.
in excluded filepaths the ~/ is not supported but it does looks at your website from the root directory. so ~/admin/somefile.aspx becomes admin/somefile.aspx in the web.config
http://www.flanders.co.nz/Blog/2006/01/07/CompressingYourASPNET20Pages.aspx[^]
|
|
|
|

|
Glad to see it's moving forward.
I'm, however, getting a blank page now. Could be something I'm doing and haven't looked into it too deeply yet.
Thanks for your work!
David
|
|
|
|

|
Hello,
I'm also experiencing that behavior. Did you find a solution for that?
Thank you.
|
|
|
|

|
If you have access to your IIS 6.0 server, you can enable IIS compression.
IIS Compression in IIS6.0[^]
Jon Sagara
Look at him. He runs like a Welshman. Doesn't he run like a Welshman? Doesn't he? I think he runs like a Welshman.
Sagara.org | Blog | My Articles
|
|
|
|
|

|
this way you can host on noncontroled servers and get compression even if the host doesnt want you too(to get more money out of you)
|
|
|
|
 |