I am wondering if it\'s possible to get a readonly FileStream to a locked file? I now get an exception when I try to read the locked file.
using (FileStream
You can simply unlock file and read file after it. Just use Handle.exe from Sysinternals , or Unlocker with command line options. They both can unlock file , and you can execute them from your program easily, without leaving your program. (But don't use them for Windows SAM file, it doesn't work with SAM ;) ) Good luck !