There are several ways to open files. This should open a file locked by log4net:

FileStream fileStream = new 
FileStream(strFileName,FileMode.Open,FileAccess.Read,FileShare.ReadWrite)

----- Original Message ----
From: "Price, Randall" <[EMAIL PROTECTED]>
To: Log4NET User <[email protected]>
Sent: Thursday, April 5, 2007 9:24:21 AM
Subject: RE: FileAppender+MinimalLock not working as expected - Correction!

Here is the code to open and read the log file:

    StreamReader sr = new StreamReader(strFileName);
    string strData  = sr.ReadToEnd();
    sr.Close();
    txtData.Text = strData;

As you can see I am not doing anything complex, just opening the file
and reading the contents into a TextBox.


Reply via email to