Link to home
Start Free TrialLog in
Avatar of nvenkata
nvenkata

asked on

Logging information to a Text file from multiple process

Is it possible to write to a text file accross process in VB.Net ? How to make it thread safe?
I have aprocess A, Process B and C all writing information to a centralized text file. I tried to use the Lock() and UnLock(). But when Process A locks it, when process B tries to write, I Get exception that other process is using the file. Is there a way to wait till the lock is released and write to the text file.

Any help would be appreciated
Avatar of Nirmalan Nagenthiran
Nirmalan Nagenthiran
Flag of Australia image

ASKER CERTIFIED SOLUTION
Avatar of Nirmalan Nagenthiran
Nirmalan Nagenthiran
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nvenkata
nvenkata

ASKER

Thanks for the pointer. It really helps