Why is .NET’s File.Open with a UNC path making excessive SMB calls?

In short, File.Open calls new FileStream() and new FileStream() does a lot of calls: NormalisePath. String filePath = Path.NormalizePath(path, true, maxPath); // fullCheck: true leads to this code: 1.a: Get full path: if (fullCheck) { … result = newBuffer.GetFullPathName(); GetFullPathName() calls Win32Native.GetFullPathName one or two times (depending on the lentgh of resulting path). 1.b. Trying … Read more

tech