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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted May 10, 2014, 3:46 AM EDT
Another possibility is that the file path is invalid for some reason.
Jignesh TrivediRank #16 · 50.3K reputationPosted May 11, 2014, 3:30 AM EDT
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.