How can I configure IIS 6 so that when a user downloads a file via http, they can determine the size of the file during the download?

link|improve this question

75% accept rate
feedback

2 Answers

up vote 2 down vote accepted

This is because the Content-Length header is missing. IIS6 should put this header on any file it serves anyway, with the exception of some dynamic files (such as PHP) where it can't determine the size.

If you're sending a binary file through a preprocessor (such as PHP/ASP/Ruby/Perl/etc), then you will need to search/ask over at Stack Overflow as to how to add the Content-Length header.

link|improve this answer
+1 for a correct answer... you may want to check your spelling, though :-) – Jessica McKinnon Oct 15 '09 at 22:06
Hmm, whereabouts did I go wrong? – Mark Henderson Oct 15 '09 at 22:57
You spelled "because" as "beacuse" – Brian Oct 16 '09 at 16:30
Thanks. All fixed. – Mark Henderson Oct 17 '09 at 0:06
feedback

The correct answer to this on IIS v6 is:

Turn off the "compress static files" option:

Go into IIS, and right click Web Sites, then Properties, then the Service tab. Unheck "Compress Static Files".

This will allow browsers to properly discover the size of downloaded files.

HTH!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.