• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

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
0
nvenkata
Asked:
nvenkata
  • 2
1 Solution
 
Nirmalan NagenthiranCommented:
0
 
Nirmalan NagenthiranCommented:
Sorry the code provided in the article is C#, but still you get some idea.
0
 
nvenkataAuthor Commented:
Thanks for the pointer. It really helps
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now