I have to log the download requests for each file that is grabbed off of a website. This log has to have the Employee ID, Solution ID, IP Address. I've used quite a few methods -
First, I was using a model where I was putting the path of the file in an anchor tag . Whenever the user clicked on this anchor tag, I was generating an AJAX request to log the file download.
But the huge drawback of this is that the user can just copy the file and paste it in a seperate window to get the file. That would ensure that the download was not logged.
Second, When I was processing the ajax request in the web method in a page. I tried transmitting the file through HttpResponse, but that didn't work either.
HttpContext.Current.Response.TransmitFile("filename");
jQuery ajax call kept failing, and I never got the file on the client side.
The key thing is, I have to do the whole thing without refreshing the page.
I'm wondering if this is possible at all...