I'm developing a multi-threaded ASP.NET 3.5 application, during working with some file, I'm getting the following exception :
The process cannot access the file because it is being used by another process
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.