I try to connect to a windows share from a other windows machine. after a long search i found sharpcifsstd.dobes.jp but i cant get the examples to work.
I receive a SharpCifs.Smb.SmbException: 'Failed to connect, IOException: transport closed in negotiate
I tryed several examples like.
//Get the SmbFile specifying the file name to be created.
var auth1 = new NtlmPasswordAuthentication("username","password");
var file = new SmbFile("smb://10.50.15.91/d/NewFileName.txt",auth1);
//Create file.
file.CreateNewFile();
//Get writable stream.
var writeStream = file.GetOutputStream();
//Write bytes.
writeStream.Write(Encoding.UTF8.GetBytes("Hello!"));
//Dispose writable stream.
writeStream.Dispose();
I can connect to the windows share with windows explorer.
Has anyone got this to work? or a other method to connect to a windows share?