I am facing a problem regarding when a file open at physically end then i will get information that file open or not (File like as .xml , .txt).
So how to get information regarding this file .
I am awaiting for a positive response.
Thanks,
Sanwar.
I am facing a problem regarding when a file open at physically end then i will get information that file open or not (File like as .xml , .txt).
So how to get information regarding this file .
I am awaiting for a positive response.
Thanks,
Sanwar.
If the file is located within the directory structure of your ASP.NET website then you can use Server.MapPath to get the file location on disk. Here's a working example:
var file = new FileInfo(Server.MapPath("~/SomeFolder/SomeFile.txt"));
If your file is not located within the web site then you will need to have the website call a self hosted WCF service that will have the appropriate security permissions to access the file and return the file information via a DataContract