We are hosting .exe files on our IIS for our users to download. Is there a direct way to know how many request came for file download and from them how many got completed (successful download ) ? Do I have to parse all the logs for this ?
First of all: Yes, you'll need to parse all the W3SVC logs to get a full view of how many times the *.exe files have been requested, and how many times the requests have been successful.
The IIS W3SVC logs will by default be placed in:
depending on IIS version. This can be configured on top (server) level, and for individual sites. The W3SVC logs contain a number of fields (these can all be turn on or off in the IIS Manager).
What you need to make sure of here is that (at least) the following fields are enabled:
The cs-uri-stem is everything after the hostname, but before any query data.
In this example:
So when you parse the log files, query them with something like
For a list of HTTP status codes in IIS 7.0 and IIS 7.5, check out: http://support.microsoft.com/kb/943891
For a similar list for IIS 5.0 and IIS 6.0, check out: http://support.microsoft.com/kb/318380
Lets assume the following is one of your lines from the log:
GET = client requested document/file
/DeptLogo.gif = File requested
200 = Response code (And 200 is supposed to mean the request was fulfilled)
The only part I am not sure about is if response code 200 will fire only if the file finished sending to the client (which still isn't 100% guarantee that it finished correctly on the client side), or if it fires once the server starts sending. I would test it yourself, download a file and let it complete, check the logs, then repeat and this time cancel the download and check the log again for differences.