C# - Can A Page Opt Out Of IIS 7 Compression
Apr 20, 2010
My pages are automatically being compressed by IIS7 with GZIP. but, for one particular page, I need to stream it to the user, using Response.Flush() when needed. But when the output is being compressed, the IIS server seems to collect all my output until the page is done before compressing and sending it to the client. That nullifies my attempt to Flush the content out to the user.
Is there a way that I can have this one page opt out of the compression?
One possible option
I've determined that if I manually set the content type to one that does not match the IIS configuration at c:windowssystem32inetsrvconfigapplicationhost.config, then IIS will not compress it. Eg. Response.ContentType = "x-text/html". This works okay with IE8, as it falls back to display the HTML. But Firefox will ask the user what to do with the unknown file type.
This could work, if there was another Mime Type I could use that browsers would accept as HTML, that is not matched in the applicationhost.config. For reference, these are the mime types that will be compressed:
[code]...
Others options?
Are there other options to opt out of compression?
View 4 Replies
Similar Messages:
Aug 4, 2010
I'm tring to implement what Steve Souders discusses [URL] about forcing gzip compression
I've got a module that's running this:
[code]....
CompressionUtils.GzipSupported just checks for the 'accepts-encoding' header while
CompressionUtils.GzipSupportedExplicitly and CompressionUtils.GzipNotSupportedExplicitly check for the cookie saying whether the browser really can read gzip
But when I load a page in Firefox I get this error:
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
and in Fiddler it shows that the content-encoding header has been added but the content hasn't been compressed
View 1 Replies
Mar 23, 2010
I have a compression module built based on several examples on the web. Initially, I hooked into the BeginRequest event of the application context to conditionally compress certain file types. This seems to have worked fine for JS and HTML, but CSS was giving me trouble. Here are the specific steps I could take to reproduce the problem consistently.
View 2 Replies
Oct 25, 2010
I am not good at IIS management.I enabled gzip compression for my web site but In IIS Temporary Compressed Files folder,i dont see any aspx type file.I just see js,text,css and some html files.Is that normal?Why dont i see aspx pages as compressed.Thats my metabase.xml and i think that my settings are true.
IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%system32inetsrvgzip.dll"
HcCreateFlags="0"
[code]....
View 2 Replies
Jan 31, 2010
I'm getting around 50% compression using System.IO.Compression and I think it could/should be getting around 75% by setting the compression level higher. Is there a way to improve the compression level or should I be looking for a different solution?
View 2 Replies
Sep 12, 2010
I have an ASP.NET web application and I'm thinking about the following: before sending any HTML or CSS content to users, I wish to 'compress' them, then cache the result and send that to the clients.I know it is possible to compress these by removing whitespaces, comments and stuff like that, but I'm not really familiar with more advanced solutions for this.
Apart from this, what compression methods are there and what are the advantages of each of them?Does some browsers or the HTTP protocol itself support any kind of compression?
EDIT: I'm interested in doing this to dynamically-generated HTML, too.
View 3 Replies
May 22, 2010
I had an interview Thursday and one questions that I was asked in the technical interview was a little confusing.
First, he asked me about Viewstate and I explained to him what all that entailed.
He then asked me what happens if the data you are putting into the Viewstate gets to big.
I told him you could then use Sessions or start storing things in the Database.
He said, what about Data Compression? I immediately responded by saying, yes you can use Serialization/Deserialization to store/retrieve the data (i'm using that in my open source project).
When he says "Data Compression", is he talking about "Serialization" or is this something different?
View 9 Replies
Jul 1, 2010
how to enable gzip compression in IIS 6.0 and IIS 7.0
View 2 Replies
Mar 4, 2010
What are the latest and greatest ways to compress the ASP.NET ViewState content?
What about the performance of this? Is it worth it to keep the pages quick and minimize data-traffic?
How can I make:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKMTM4Mjc3NDEyOWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgkFLGN0b
DAwJENvbnRlbnRQbGFjZUhvbGRlcl9NYWluQ29udGVudCRSYWRCdXQxBSxjdGwwMCRDb250ZW50UGxhY2VIb
2xkZXJfTWFpbkNvbnRlbnQkUmFkQnV0MQUsY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyX01haW5Db250ZW50J
FJhZEJ1dDIFLGN0bDAwJENvbnRlbnRQbGFjZUhvbGRlcl9NYWluQ29udGVudCRSYWRCdXQyBSxjdGwwMCRDb
250ZW50UGxhY2VIb2xkZXJfTWFpbkNvbnRlbnQkUmFkQnV0MwUsY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyX
01haW5Db250ZW50JFJhZEJ1dDQFLGN0bDAwJENvbnRlbnRQbGFjZUhvbGRlcl9NYWluQ29udGVudCRSYWRCd
XQ0BSxjdGwwMCRDb250ZW50UGxhY2VIb2xkZXJfTWFpbkNvbnRlbnQkUmFkQnV0NQUsY3RsMDAkQ29udGVud
FBsYWNlSG9sZGVyX01haW5Db250ZW50JFJhZEJ1dDXz21BS0eJ7991pzjjj4VXbs2fGBw==" />
Into sometning like this:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKMTM4Mjc3N==" />
View 6 Replies
Mar 20, 2010
I have trouble with JSON response compression. I look to response headers after uploading website to production server (Windows 2008, IIS 7) and found uncompressed response. Turning on "Enabled static compression" and ""Enable dynamic compression" in IIS control panel does not effect. ASPX pages was responsed gzipped, but webservice response uncompressed.
I looked to google, but no answer found about this trouble. Also, I try this [URL] way (and adding to web.config this module) - but this source is excellent working at development machine with ASP.NET development server (and have seven times response size reduced) and totally ignored at IIS7.
How I can apply gzip compression to json responses from my webservice?
View 2 Replies
Apr 1, 2011
I'm trying to configure IIS 7.5 to compress static htm and js files. Here is my web.config for the web site:
[code]....
Compression starts working when I set doDynamicCompression to true. But I can't use this option because it is disabled at my hosting.
View 2 Replies
Jun 1, 2010
I have an application with a FileUpload control. The code behind saves the uploaded file (which I've stipulated in the code must have a ".jpeg" extension) to the webserver's hard disk. Details about the image, such as its ID, Title, Description and Upload date are saved in an MS SQL Server database. Nothing difficult here.
What I'd like to do instead... is take the uploaded image (which will be a "large", high-quality image), save this as above but ALSO dynamically resize and resample a copy of this image and store a thumbnail of it on the webserver hard drive as well.
I can't find a post which explains how to do this in this forum group. Can anyone point me in the right direction for an answer. I am using Visual Studio 2008, ASP.NET 3.5 and Visual Basic.NET 2008.
View 6 Replies
Apr 27, 2016
i want to compress image size into 40 or 50 kb
string CustomerID = "";
if (Session["RoleID"] != null)
{
CustomerID = Request.Form["CustomerID"];
//string CustomerID = Request.Form["Customer.CustomerID"];
if (CustomerID != null)
{
[CODE]...
View 1 Replies
Mar 20, 2011
I need to enable compression to speed up my site.However, I only found way to do it via action filter which requires me to put [compress] action filter to every actions.such as; [URL]aspxThis is quite lots of work and I may miss an aciton which is not desiable.So, is there a way to enable compression site level? I mean, by changing config or put code in request handler to support compression.Also, action fileter approach doesn't compress javascript or css.How do you support compression? Is there a way to support it?I heard that there is a way to do it via IIS, but my hosting site doesn't support this.
View 10 Replies
Feb 26, 2011
i m passing a string from a web method with 1000000 charater so i m using compression in c# befor return it. but i dont know how to decompress it in javascript
View 5 Replies
Feb 21, 2011
I have an ASP.NET web application that has HTTP compression enabled (through IIS settings). One of the features of the app involves creating multiple text files and packaging them as a single zip file to be downloaded by the user.
With HTTP compression enabled, the files created by the application are zipped twice - once by the web application and once more by HTTP compression; with the result that when the user downloads the zip file, it has 1 file which is the application generated zip file, and this second zip file has the original contents.
My requirement is to disable HTTP compression only for the zip file. How do I achieve this? The file extension "zip" is not included in the metabase file for compression.
View 2 Replies
Apr 7, 2010
I'm trying to debug some javascript problems, but the script manager compresses the javascript code making this difficult. I have set ScriptMode=Debug in the ToolkitScriptManager but this still happens. I am also using a Web User Control. Does anybody know how to disable the script compression for debugging purposes?
View 4 Replies
Nov 3, 2012
Using GZIP in asp.net application...
I have tried searching on google... we put some code in global.asax and web.config.. but not working..
View 1 Replies
Nov 16, 2010
I have a bunch of internet devices which communicate with my MVC app on IIS 7.5. I'm currently using the built-in dynamic transparent compression (gzip/deflate).
I'd like to be able to support a different compression algorithm, which does a lot better than gzip (7zip) for the content I'm sending/receiving.
In other words, on the client I will add the header: accepts: gzip, deflate, 7zip (or similar), and the server will recognize this, and apply the best choice when sending the content.
What's the best way to go about hooking this all together? (I know how to implement the actual 7zip encode/decode aspect)
View 1 Replies
Mar 10, 2011
I have an asp.net page which has 4 grid views connecting to mysql database for data population. The average response time for a round trip to the server is 20.55 seconds. That is way too much time. I have since applied the HTTP Compression GZip to improve the speed,I don't see any improvement in load time. Ive also used pagination, but no effect.
View 3 Replies
Sep 13, 2010
I got gzip working, but there are issues with IE. (works fine with FF and Chrome) Message: ASP.NET Ajax client-side framework failed to load. (and many other js related errors)
How can I prevent gzip compression on ie browsers ?? Other people who had similar issues enabled compression in IIS and that seems to solve the issue, but I can't do this on my discount machine...
This is what I use:
HttpApplication app = (HttpApplication)sender;
string acceptEncoding = app.Request.Headers["Accept-Encoding"];
Stream prevUncompressedStream = app.Response.Filter;
if (acceptEncoding != null && acceptEncoding.Length != 0)
[Code]....
View 1 Replies
Jan 10, 2013
On PageSpeed Insights they recommend highly doing two things:
1) Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
2) Enable compression
Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
We are with Network solutions and believe they are using IIS 6 with regular asp.net code. Some of the images are using Amazon S3/Cloudfront.
How do we implement the above items? I see a lot for IIS 7.
View 1 Replies
Mar 7, 2014
i am trying to compress video files by using gzip in asp.net.
View 1 Replies
Jun 19, 2012
I have referred below mentioned links and successfully implemented Gzip, by compressing aspx pages. URL....My website is ajax enabled. One of page is having gridview. While debugging gridview rowCommand fires and records are displaying in debugging mode, but same records are not displaying on web page controls.
View 1 Replies
Aug 26, 2010
My master page looks like:
<head runat="server">
<title>
<asp:ContentPlaceHolder ID="PageTitlePlaceHolder" runat="server" />
</title>
Content pages look like:
<asp:Content ID="TitleContent1"
ContentPlaceHolderID="PageTitlePlaceHolder" runat="Server">
My Page
</asp:Content>
This works by placing the content page specific title on the page ("My Page" in this example). Now I want to add a global prefix to the title in my master page for the site name. So I want:
<head runat="server">
<title>
Example.com:
<asp:ContentPlaceHolder ID="PageTitlePlaceHolder" runat="server" />
</title>
However, when I do this content pages are still rendered without "Example.com" in the tile, it's like it's ignored.
Why is this happening and how can I achieve this?
View 2 Replies