0

In my mvc2 project i have a method called DownloadPDF. In that i have,

httpContext.Response.WriteFile(<FilePath>);
httpContext.ApplicationInstance.CompleteRequest();

I wan't to track whether the file has downloaded successfully. I referred following tutorial but it doesn't work when i host the project in IIS.

http://www.codeproject.com/Articles/74654/File-Download-in-ASP-NET-and-Tracking-the-Status-o

tereško
  • 58,060
  • 25
  • 98
  • 150
Dilma
  • 625
  • 3
  • 10
  • 22
  • 1
    what do you mean by "it doesn't work". Are you getting a specific error of any sort? – Forty-Two Sep 13 '12 at 12:51
  • It works when i debug the project in Visual studio development server. But in IIS i couldn't even download the file. – Dilma Sep 14 '12 at 05:11

1 Answers1

0

If you application targeted for HTML 5 browser means, try the "Html5 Progress Event". It will supply all the necessary information

  1. total - Total bytes being transferred
  2. loaded - Bytes uploaded thus far
  3. lengthComputable - Specifies if the total size of the data/file being uploaded is known

For more information: http://www.matlus.com/html5-file-upload-with-progress/