Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: An established connection was aborted by the software in your host machine

$
0
0
Hi,

I'm using the simple code below to upload a small file. Every time the file has uploaded and I disconnect I then get a SocketException error (An established connection was aborted by the software in your host machine).

The hlighlighted code in Session.NET.cs is:
var receivedBytes = this._socket.Receive(buffer, offset + receivedTotal, length - receivedTotal, SocketFlags.None);
 Using sftp As Renci.SshNet.SftpClient = New SftpClient("xxxxxx.com", "22", "username", "password"

            sftp.Connect()

            sftp.ChangeDirectory("/stuff/Import/")

            Dim fs As Stream = File.OpenRead("C:\Temp\test.csv")
            sftp.UploadFile(fs, "test.csv")

            sftp.Disconnect()

End Using

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>