How To Turn Off HTTP Compression For Downloaded Zip Files
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
Similar Messages:
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
Mar 28, 2010
I'm downloading a vCard to the browser using Response.Write to output .NET strings with special accented characters. Mime type is text/x-vcard and French characters are appearing wrong in Outlook, for example Montréal;Québec .NET string shows as Montréal Québec in browser.Apparently vCard default format is ASCII. .NET strings are Unicode UTF-16.I'm using this vCard generator code from CodeProject.com
I've played with the System.Encoding sample code at the bottom of this linked MSDN page to convert the unicode string into bytes and then write the ascii bytes but then I get Montr?al Qu?bec (progress but not a win). Also I've tried setting content type to both us-ascii and utf-8 of the response.If I open the downloaded vCard in Windows Notepad and save it as ANSI text (instead of default unicode format) and open in Outlook it's okay. So my assumption is I need to cause download of ANSI charset but am unsure if I'm doing it wrong or have a misunderstanding of where to start.Update: Looking at the raw HTTP, it appears my French characters are being downloaded in the unexpected format so it looks like I need to do some work on the server side... (full size)
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
Aug 5, 2010
I have written the following code to download a file from sharepoint. The downloded file works fine in only some machines. For others, it says that the file is corrupted. The issue is for MS Office and image files, however the PDF is not having any issues. We have identified the issue of corruption as due to the addition of a hexadecimal number at the top of the file contents. When it is removed, the file gets opened correctly. The hexadecimal character has been traced out to be representing the file size in bytes. Why this is happening only in some machines and how can we fix it?
private void DownloadFile()
{
SPListItem item = GetFileFromSharepoint();
[code]...
View 1 Replies
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 7, 2014
i am trying to compress video files by using gzip in asp.net.
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
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 21, 2010
If I make a http module it only catches .aspx files. Files with other extensions (.js, .htm) are ignored.
Does this have anything to do with IIS?
Strangely enough all extensions are caught on the ASP.net Web Development Server but not when hosted in IIS.
View 1 Replies
Jun 14, 2010
I just inherited an ASP.NET WebForms web application that I was tasked with refactoring. One of the features is a file upload and while debugging I noticed that as soon as a file is posted to a certain page/handler, it is automatically uploaded to the root directory of the application. The file is then moved to the proper location. I can't seem to figure out whats causing this automatic upload of the file. Is there something I'am overlooking in ASP.NET WebForms that allows this to happen? Is it an IIS configuration or something?
View 1 Replies
Nov 28, 2010
When I have a HttpHandler class in C#/ASP.NET mapped to a file extension in IIS any file with that extension fails to download/display in web browsers (it's downloaded as a 0-byte file in some browsers and nothing at all in other browsers). After removing the application mapping for the HttpHandler in IIS so it doesn't call the IHttpHandler class in C#, the web browser downloads the file successfully.
This was tested with an IHttpHandler class in C# that has an empty ProcessRequest method.
View 2 Replies
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
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
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
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
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
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