I have a C# code where I am checking if file exist at server location then do some operation. It works fine on local machine . But on server when it try to see the file exist , it returns false and couldn't able to find the file even though file is present at same location. If I do IISReset and run the same program again then it works . Here is my code
mspath is variable who is holding a server location path .
if (File.Exists(msPath))
{
int length = msPath.IndexOf(companyName);
string path = msPath.Substring(0, msPath.LastIndexOf("\\"));
}