0

I developing a web application using ASP.NET. The users can download an excel template from the site. Now, i want to check the integrity of the file to check whether the file is the same as that on server and it is not corrupted. I can get md5 hashcodes for the file on the server by identifying the path using server.mappath() method but how can i get the location of the downloaded file to generate and check the hashcodes.

Sharique Maaz
  • 65
  • 1
  • 1
  • 8

1 Answers1

4

how can i get the location of the downloaded file to generate and check the hashcodes.

You can't. (and thats a good thing). Also, you shouldn't.

You can't access client's system resources through browser. You may use ActiveX (or others browser/OS specific) to do something like that but a better option would be to just provide the hash with each download and let the user verify the file integrity.

Community
  • 1
  • 1
Habib
  • 219,104
  • 29
  • 407
  • 436