hI,
I'm using LOG4NET to log to a txt file. However, one of my forms needs to open the txt file (using streamreader) to read the contents and display them in a .txt file. However, I keep getting an exception stating that the file is locked by another process.
Is there a way around this in LOG4NET?
Thanks
This may be help you.
http://www.ericbt.com/Blog/48
If you open the log file with ReadWrite sharing enabled (FileShare.ReadWrite) it will probably work.
You can always uses Process Monitor from http://www.sysinternals.com to see what is happening.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With