logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Price, Randall" <randa...@vt.edu>
Subject RE: FileAppender+MinimalLock not working as expected - Correction!
Date Thu, 05 Apr 2007 13:24:21 GMT
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.

Randall Price

Secure Enterprise Technology Initiatives
Microsoft Implementation Group
Virginia Tech Information Technology
1700 Pratt Drive
Blacksburg, VA  24060

Email:  Randall.Price@vt.edu
Phone:  (540) 231-4396

-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Wednesday, April 04, 2007 6:15 PM
To: Log4NET User
Subject: Re: FileAppender+MinimalLock not working as expected -
Correction!

How are you trying to open the file in code?


----- Original Message ----

From: "Price, Randall" <randallp@vt.edu>

To: Log4NET User <log4net-user@logging.apache.org>

Sent: Wednesday, April 4, 2007 4:49:27 PM

Subject: RE: FileAppender+MinimalLock not working as expected -
Correction!


   When my WinForms application is running I CAN double-click on the log
file from Windows Explorer and open the log file in Notepad.

     

   But when I click my View Log File button on my application, I get the
"process cannot access ... being used by another process" error message.
However process should be the same process making the request to open
the file for reading.

     

   Has anyone ever done something like this before? 






Mime
View raw message