c# - StreamWriter and Samba2 (SMB2) -
ok guys, 1 tough one. the scenario : i have multiple services running on multiple machines each service has multiple threads, , each thread writes file on filer - shared storage used machines (using share such \\filername\foo\bar) the filer machine netapp machine both filer , machines running services using smb2 (http://en.wikipedia.org/wiki/server_message_block) the instruction used write file simple 1 listed below in [the code] [the code] using (streamwriter outfile = new streamwriter(pathtothefile, false)) { outfile.write(stringtowriteinthefile); } [/the code] the problem : sometimes service remains "stuck" on instruction. error given is: the process cannot access file '\\filername\foo\bar\myfile.txt' because being used process. after of these errors, service refuses release lock on file. happens then? you can delete file, file recreated. if sort-of permanent stream alive , keeps writing file indefinitely. you can stop service: it...