Count zip file downloads.........

  • Thread starter Thread starter adam
  • Start date Start date
A

adam

How would i count how many times a file has been downloaded?
I want to do this C# and ASP.NET. Could any one point me to write direction.
Thanks
 
ASP.NET had what are called modules (IHttpModule) and handler
(IHttpHandler). These allow for the interception of file requests and allow
for special processing. If you wanted count the number of times a file gets
downloaded, you and write a module that will be invoked on each request.
You could then log that information to a database or XML or whatever you
want.

The caveat is that the file has to be sent through the ASP.NET handler. Any
static file can be processed by ASP.NET and just streamed to the client.
You will need to configure IIS to send the requests through ASP.NET.
 
Back
Top