Hi There.
It has been a while since I have been in here, but have had some good experiences in here. Now I have a problem I do not seem to be able to solve, or rather do not know how to go about, though I tried
Google.
Well, I want to count the number of times a file has been downloaded. Not just how many times some button has been clicked on the site, but one count for a succesfull download. If you use e.g. the TransmitFile method like this...
Code:
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.AddHeader(
"Content-Disposition", "inline; filename=" + System.IO.Path.GetFileName(path));
HttpContext.Current.Response.ContentType = "application/zip";
HttpContext.Current.Response.TransmitFile(path);
HttpContext.Current.Response.End();
... you will get a dialog in which you can
Cancel og
Save, therefore counting on the button click that started the download will not suffice since
Cancel would count for one.
I once saw... or should I say... heard about the download functionality at
allofmp3.com. At this site it was only possible to download some file once and it worked beautifully, even it the download was interrupted, but how?
Thanks, Jacob.