In my process, i use the following code
DirectoryInfo dir = new DirectoryInfo(path); // path is a network path
FileInfo[] files = dir.GetFiles(".xls");
actually there are 2 .xls files in that path, i can see when i paste the path in computer explore. but in the program files length is 0;
I tested in my local computer it can get the 2 files, and files length is 2.
but when i deployed in server, i set a schedule task use the same domain account as on my local. from the log i write,
the files length is always 0. it runned many times,still 0.
the trick is, when i restart the server, the can get those 2 files.
what will be the possible reason?