The process cannot access the file because it is being used by another process

using (FileStream fs = 
    new FileStream(filePath,
        FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
//...

http://msdn.microsoft.com/en-us/library/system.io.fileshare.aspx

Your log may be write locked, so try with FileShare.ReadWrite.

Leave a Comment