: Sunday, February 05, 2006 11:00 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] System.IO.Exception
If you are opening the file (using e.g. Notepad) while the logger does not
have the file open, it's going to take an exclusive lock on the file (it
assumes you will be wr
open and just write into it.
Close the file when the process terminates.
Peter
- Original Message -
From: "Alex Smotritsky" <[EMAIL PROTECTED]>
To:
Sent: Sunday, February 05, 2006 1:57 PM
Subject: [ADVANCED-DOTNET] System.IO.Exception
| I'm working on some code to
If you are opening the file (using e.g. Notepad) while the logger does not
have the file open, it's going to take an exclusive lock on the file (it
assumes you will be writing the file). Your file open will then fail as
noted.
What you need to do is one of two things:
1. On program startup, open
I'm working on some code to do some asynchronous logging to a text file. If
I open the file (manually) while it's being written to I get a
System.IO.Exception with the message "The process cannot access the file
(the path) because it is being used by another process. This happens
consistently with