I have a zip file on website running on a Windows 2008 / IIS7 server. Is there a way to check how many times that file was downloaded?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do it in so many ways
(in the order of increasing complexity and stupidity) 😉
Provide direct link to a file and monitor your web logs. You can use a LogParser tool from microsoft to run SQL like queries against the logs to extract data you need.
Don’t provide a direct link to a file. Have a button instead. When a button is clicked you increment the counter and serve the file.
You can use URL shortening services (e.g. bit.ly) – they can provide you with the click stats etc
E.g. if you append a ‘+’ sign to the end of the bit.ly URL you will get the stats. Or you can register on their site.
As a variation – use your own service. I.e. have a lookup table:
shortcode1 – Path1\File1.ext
shortcode2 – Path2\File2.ext
…
shortcodeN – PathN\FileN.ext
a link to download your zip file will then look like:
http://www.yoursite.com/getFile.aspx?code=shortcode1
getFile.aspx gets executed, performs a lookup, updates stats, serves Path1\File1.ext back.
You can use monitoring tools to keep track of which files were uploaded/downloaded E.g. http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1494
Create/Use an ISAPI extension to monitor file downloads
Map .zip extension through ASP.Net in IIS and a corresponding code to properly react and update stats.