title: How to know which processes is using a file under ASP.NET?
body: <p>I'm developing a multi-threaded ASP.NET 3.5 application, during working with some file, I'm getting the following exception : </p>
  
  <blockquote>
    <p>The process cannot access the file
    because it is being used by another
    process</p>
  </blockquote>
  
  <p>I'm looking for a way to know exactly which process is locking that file so I can stop its access to the file. OR if that is complicated, I want a way to lock the file by my thread so other threads/processes can't access it. Thanks.</p>