I have a windows service written in C# running on Windows Server 2012. The service is running as a domain user with permissions on the local machine and NTFS permissions to shared network resources can access shared files and directories in Windows Explorer when logged on as this user
I reboot the server, the file system calls succeed at first. Then after some amount of time, or after accesses to the same file path from that computer, the programmatic calls will start to fail and will never spontaneously succeed again. Rebooting the server fixes the issue for a very short while.
I referred Windows service cannot access UNC path
I am facing the same issue as in the above link. But the network share is between Windows server 2012 R2 and another server with same OS.
Exception stack trace :
MESSAGE:
An unexpected network error occurred.
STACK TRACE:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source)
Can anypne please help?