I am trying to delete a file on another computer but keep getting "Access to the path '..../file' is denied". I run my application in a separate application pool as user, let's say, 'User1' on the first server. On the second server, where the file to be deleted is located, I've created a user with the same username (User1) and password and granted this user full access rights to the directory contaning the file to be deleted.
I am trying to delete the file like this;
string dir = "\\server2\dir\";
if (System.IO.File.Exists(dir + "_File.pdf")) System.IO.File.Delete(dir + "_File.pdf");
..when getting this error; "Access to the path '\\server2\dir\_File.pdf' is denied."
I can ,however, overwrite the file with another file with the same name without any problem, but not delete it.
What can possibly cause this delete problem? I d ...
Go to the complete details ...