Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dowloaded filesize larger than on server

Status
Not open for further replies.

seymourecg

Programmer
Jul 16, 2009
2
US
Hello All,

I have developed an asp.net website with the ability to download files from the webserver (webserver is godaddy). I have been noticing that the downloaded files size is much larger (i.e. 2X or more) than the original filesize reported on the webserver.

For instance, I have an 88MB file that once downloaded the reported file size on the local computer is 271MB. The file works fine (it is a video), but for some reason it has more than doubled in size.

I have looked all over the internet and haven't come accross the solution yet.

The website is using asp.net 3.5. Browser is IE8. Local operating system is Win XP Pro 32bit. The files can be by a hyperlink field in a gridview control bound to an sqldatasource.

Totally clueless on this one.

Any help would be appreciated.

Thanks,

STeve
 
Well I figured it out. In code behind if I did not provide the file size via the content-length in the Response.Addheader function then it would somehow make the file size grow. Once I provided the size of the file within the download function it would report the right file size while downloading and after download once on the local disk.

STeve
 
Thanks for posting what you found. This might be helpful to someone else in the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top