Skip to content

SftpClient UploadFile throws SocketException: 'An existing connection was forcibly closed by the remote host' #950

Open
@avisosoft

Description

@avisosoft

This exception has been thrown when VPN client is connected. Same code works fine if VPN is switch off.

image

StackTrace:

at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Renci.SshNet.Abstractions.SocketAbstraction.Send(Socket socket, Byte[] data, Int32 offset, Int32 size)
at Renci.SshNet.Session.SendPacket(Byte[] packet, Int32 offset, Int32 length)
at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Session.Renci.SshNet.ISession.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendData(Byte[] data, Int32 offset, Int32 size)
at Renci.SshNet.Channels.Channel.SendData(Byte[] data)
at Renci.SshNet.SubsystemSession.SendData(Byte[] data)
at Renci.SshNet.Sftp.SftpSession.SendRequest(SftpRequest request)
at Renci.SshNet.Sftp.SftpSession.RequestWrite(Byte[] handle, UInt64 serverOffset, Byte[] data, Int32 offset, Int32 length, AutoResetEvent wait, Action1 writeCompleted) at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action1 uploadCallback)
at Renci.SshNet.SftpClient.UploadFile(Stream input, String path, Boolean canOverride, Action`1 uploadCallback)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions