Hi,
I have a problem.. I need to write to a file (for a logging component) and I need to give a read access to the file for other applications to read even when the component is writing to the file.
I did like this..
FileStream fs=File.Open(@"C:\a.txt",FileMode.Append,FileAcces s.Write,FileShare.Read);
sw=new StreamWriter(fs);
sw.WriteLine("Some thing to write..");
I cant close the filestream or the writer.. now if i try to access the file . The access denied error is coming..
Am i missing something here! I have given the Fileshare.read permission!
Any pointers is greatly welcomed!
Warm Regards,
Aravinthan N
[email protected]