I keep getting this error when connecting and uploading a file. There are no errors in Event Log or otherwise.
Here's my code:
SSHNet.PasswordConnectionInfo connInfo = new SHNet.PasswordConnectionInfo(xxxxxxxxxxx);
using (var client = new SSHNet.SftpClient(connInfo))
{
client.Connect();
if (client.IsConnected)
{
using (Stream fileStream = EncryptionUtilities.DecryptFile(path))
{
client.UploadFile(fileStream, path);
fileStream.Flush();
fileStream.Close();
fileStream.Dispose();
}
}
client.Disconnect();
}
Any suggestions highly appreciated.
Comments: ** Comment from web user: drieseng **
Here's my code:
SSHNet.PasswordConnectionInfo connInfo = new SHNet.PasswordConnectionInfo(xxxxxxxxxxx);
using (var client = new SSHNet.SftpClient(connInfo))
{
client.Connect();
if (client.IsConnected)
{
using (Stream fileStream = EncryptionUtilities.DecryptFile(path))
{
client.UploadFile(fileStream, path);
fileStream.Flush();
fileStream.Close();
fileStream.Dispose();
}
}
client.Disconnect();
}
Any suggestions highly appreciated.
Comments: ** Comment from web user: drieseng **
It's probably a long shot, but have a look at the workaround suggested by these kb articles:
http://support.microsoft.com/kb/817571
http://support.microsoft.com/kb/318584
Would it be possible for you to debug the SSH.NET code ?
Can you verify whether the upload completed successfully ?
Are you using multiple threads ?