i get false result when trying use file.exist() for network share ()..
if (File.Exists(Server.MapPath(path1+ FileName )))
{
}
where path1 is avirtual directory reference to network share ,,
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted May 11, 2014, 7:30 AM
hi,
Try with creating file info class object
FileInfo fi = new FileInfo(Server.MapPath(path1+ FileName));
bool exists = fi.Exists;
hope this will help you.
VulpesPosted May 10, 2014, 7:46 AM
Another possibility is that the file path is invalid for some reason.