views:

31

answers:

2

I'm writing a small asp.net program used to log information whenever some pdf files is accessed. I use httpmodle to achieve that. But the problem is if the pdf file is big (>1M or so), more than one PreRequestHandlerExecute events will be raised (if I download the file, only one event will be raised). These pdf files belong to another web app. If possible, I don't want to touch that app. Any suggestions appreciated.

A: 

Depending on the information you are logging you might be able to save yourself some work just by parsing the server log files using something like Log Parser.

Ian Oxley
A: 

Thank you. I ever used log parser to do it, but I found it is not suitable for my case. IIS will not write the information to its log file immediately. Here what I don't understand is why asking a pdf from server will trigger PreRequestHandlerExecute several times. And it seems that bigger the file more events was raised.

After checking the log file of IIS I found there are several log records for the same pdf request. So...

leonbyron