Accessing a shared file?
问题 I'm trying to read a file body from a Windows shared folder by it's UNC path, and getting this exception: The process cannot access the file '\\<someIP>\logs\LogFiles\W3SVC1\u_ex141017.log' because it is being used by another process. However, this file isn't really locked by any process. I can view it from my PC using a text editor, etc. I'm using this code to read the file: var logFile = File.ReadAllText(logPath); and var logFile = (string)null; using (var fileStream = new FileStream