Solved

Logging information to a Text file from multiple process

Posted on 2009-04-10
3
254 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:nvenkata
  • 2
3 Comments
 
LVL 12

Expert Comment

by:Nirmalan Nagenthiran
ID: 24121432
0
 
LVL 12

Accepted Solution

by:
Nirmalan Nagenthiran earned 500 total points
ID: 24121437
Sorry the code provided in the article is C#, but still you get some idea.
0
 

Author Closing Comment

by:nvenkata
ID: 31569060
Thanks for the pointer. It really helps
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question