Last post Dec 01, 2009 01:00 AM by reza141414
Nov 30, 2009 10:39 PM|gswartz|LINK
I have a page that allows users to download files from my site. For security reasons I have to mask the url to the file so I am using an httphandler which calls the response.transmitfile method. It has been working fine for the last 2 months and then within
the last couple of days I've started having a problem where the server isn't sending the filesize of the file. Because of this the user downloading the file continues to download way past the actual size of the file. I don't know what they'd be downloading
but it never stops. Does anyone know why it would do this? Here's the code that I'm using. Thanks.
string filename = Path.GetFileName(url);
context.Response.Buffer = true;
context.Response.Charset = "";
context.Response.ContentType = "application/x-rar-compressed";
context.Response.AddHeader("content-disposition", "attachment;filename=" + filename);
Dec 01, 2009 01:00 AM|reza141414|LINK
very nice question...