Anybody know how to share log file between multiple instances of the same application? Our application logs all the trace information to a text file, but the problem is that only one instance of the application gets the write access eventhough I have set the share and access to ReadWrite. Any idea how can I share the same log file between two instances? here is code that I have.
If I run the app, only the first instance that I launched gets the write access and the second instance does not log any info.
-Kris
Code:
m_FileStream= m_FileInfo.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite);
m_TraceListener= new TextWriterTraceListener(m_FileStream);
Trace.AutoFlush= true;
Trace.Listeners.Add(m_TraceListener);
If I run the app, only the first instance that I launched gets the write access and the second instance does not log any info.
-Kris