Solved

Logging information to a Text file from multiple process

Posted on 2009-04-10
3
252 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now