title: Find out who locked file on a network drive in C#
body: <p>A program is running on multiple machines that share a network drive. It can use</p>
  
  <pre><code>... = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read);
  </code></pre>
  
  <p>to lock a file from writing. All the other instance then can only read it and display a warning, that the file is not writable.</p>
  
  <p><em>How can I find out who (i.e. which machine) locked the file</em>, to display that along the warning?</p>