?
Solved

iis 6.0 unknown file size when downloading .zip files

Posted on 2010-01-07
30
Medium Priority
?
1,262 Views
Last Modified: 2012-05-08
I have a server running windows server 2003 with iis 6.0
When I upload a .zip file to one of the websites on the server and then try and download it via the website, the download starts as it should but where it says "Estimated time left" the time is unknown. How can I fix this so that the clients who download the zip file can see the size of the file and time left for the download to complete?
0
Comment
Question by:koossa
  • 14
  • 8
  • 7
29 Comments
 
LVL 17

Expert Comment

by:Rovastar
ID: 26199297
DO you have compression enabled?

There are various technical details about similiar scenerios in this thread:
http://www.eggheadcafe.com/software/aspnet/31045970/compression-and-disablin.aspx

Read David Wang's (ex Microsoft IIS team) comments
0
 
LVL 17

Expert Comment

by:Rovastar
ID: 26199309
Or it could be something just a simple as the configuration the MIME types for zip files.
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26199321
This happens if IIS doesn't send content-length data in the header.

Check to see that the .zip extension is mapped to an appropriate handler.

In the IIS console, if you right click your server, select properties and choose to edit MIME map.

Have a look for .zip.  Ensure it exists firstly, and then check to see that its mapped to something like application/x-zip-compressed
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:koossa
ID: 26199409
Yes, compression is enabled and my mime type for zip is set to application/octet-stream.
0
 
LVL 17

Expert Comment

by:Rovastar
ID: 26199432
CHange it to
application/x-zip-compressed
0
 

Author Comment

by:koossa
ID: 26199446
Ok, I have set it to application/x-zip-compressed and restarted iis, but still the same problem
 
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26199484
Which browser are you using?  Internet Explorer?  It might be possible the browser isn't reading the headers correctly.  Or there might be a proxy in the way interfering and modifying the header.

Does this happen if you use another PC from another location?
0
 

Author Comment

by:koossa
ID: 26199625
I have tried IE8 and google chrome. I've also tried from 3 different locations.
0
 
LVL 17

Expert Comment

by:Rovastar
ID: 26199752
Run fiddler
http://www.fiddler2.com/fiddler2/

What does that say when you try and download this content?
0
 

Author Comment

by:koossa
ID: 26201181
Ok, I have downloaded and run fiddler.
Download the zip file and get all kinds of statistics and stuff.
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26201213
Look for anything remembling content-length and its value
0
 

Author Comment

by:koossa
ID: 26201274
Content-Length: 0
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26201408
Do you have any proxy servers in front of the webserver?

How are you downloading the file?  Is it a plain old link to the zip file, or is it through a web application?

Try giving the folder where the zip file resides read permissions for the following accounts:
IUSR_<Machinename> local user account
IIS_WPG local security group
0
 

Author Comment

by:koossa
ID: 26202102
- No Proxy servers
- Downloading it through a link
- IUSR_[machne name] already have read rights on the folder, I have added IIS_WPG and gave it read rights on the folder, but everything is still the save and fiddler still give Content-Length: 0
0
 
LVL 17

Expert Comment

by:Rovastar
ID: 26202114
Ummh

Content length  = 0 is strange.


Proxies are an obvious issue.

Can you test this on the server using localhost (or locally defined host file for your website) [so you get no network activity] do you get the same issues?

I would have though that if you didn't have read permissions I wouldn't download the files at all but it is worth a try.

What do the IIS logs say about this? Compare the local access (as I described above) with one from the outside and post here.

Also do all zip files do this? Could it be the way you uploads them (via app??)? *shrug*
Can you create a normal zip file on the server (zip up a text file or something) and test this?

Also have you done an IISreset since you did the MIME type change?
 
(sorry for all the questions :) )


0
 

Author Comment

by:koossa
ID: 26202169
- There are a couple of websites on this server, so I'm not sure how to do localhost on it?
- All the zip files on all the websites are doing this.
- I have added the Mime type with application/x-zip-compressed, then restart the IIS, but have removed it again, because the files still don't display progress but are damaged when downloaded. (have not done IISreset)
0
 
LVL 17

Expert Comment

by:Rovastar
ID: 26205249
To connect to a specific website locally you need to.

Create an entery in your local hosts file

%SystemRoot%\system32\drivers\etc\

for the site you want and resolve locally.

That way when you type this dns entry into the browser locally it will go to the correct website.

Normally you don't have to do too much to get thsi working. I am thinking now more of a proxy/networking issue.

Anyway check locally and let me know. Test with a large file. :)
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26206021
Something else to think about...

Its possible that the zip file is actually corrupt after you have uploaded it.  If you login to the server locally, can you actually open the zip file, and does it seem valid?

IIS will check the size of the file and send this as the content-length header value.  If the zip file is corrupt, there is a chance that IIS can't check the file which is why its sending you a 0 byte response.

How are you uploading the zip file?  Is it possible to login to the server, zip a random file and try and download that, just to test?
0
 

Author Comment

by:koossa
ID: 26207550
I'm uploading the file using fpt (windows explorer)
When I add the mime type application/x-zip-compressed, the file is corrupted when I download it, if I then remove it again, the same file download successful.
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26207881
Try changing it to this:  application/x-compress
0
 

Author Comment

by:koossa
ID: 26207945
I have changed it to application/x-compress and restart iis, but still "Estimated time left: Not known".
0
 
LVL 13

Accepted Solution

by:
Springy555 earned 1500 total points
ID: 26208469
This seems like a very strange problem.

Although it would always be nice to know the root cause, if your intentions are to get this working the only other thing I can think of is to backup all your web files/folders and uninstall IIS from the server.

A fresh IIS install would hopefully fix any rogue setting or value thats causing this problem.
0
 

Author Comment

by:koossa
ID: 26208533
We're hosting a couple of websites and one of the sites is a marketing site that we cannot afford to switch of for longer than 5-10 minutes.
0
 
LVL 13

Expert Comment

by:Springy555
ID: 26208575
Does the same problem occur if you put the zip file under the marketing website?

If not, you could potentially delete the other website and re-create it.
0
 

Author Comment

by:koossa
ID: 26208750
Yes, all the sites are doing the same.
0
 
LVL 17

Expert Comment

by:Rovastar
ID: 26210356
Did you try it locally on the server itself to help eliminate proxy/network issues?
0
 

Author Comment

by:koossa
ID: 26276368
If have try it locally, but still the same "Unknown"
0
 

Author Comment

by:koossa
ID: 26277023
I have added an entry to the host file
127.0.0.1           www.mysite.com

on server level, the mime type for .zip is application/octet-stream.

When I download it, it give me estimated time unknown.

If I then add on website level's mime type a application/x-compress for .zip file or application/x-compressed for .zip file I get a dialog saying "getting file information" and then after that "internet explorer was not able to open this site".
If I remove the mime type at website level I'm back to "estimated time unknown"
see attachements
Image1.png
Image3.png
untitled4.png
0
 

Author Closing Comment

by:koossa
ID: 31673957
not the answer that I were looking for.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question