__My application encountered the following unhandled exception that caused the process to exit:__
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Renci.SshNet.Common.SshConnectionException
Stack:
at Renci.SshNet.Session.SendMessage(Renci.SshNet.Messages.Message)
at Renci.SshNet.Channels.Channel.SendMessage(Renci.SshNet.Messages.Connection.ChannelCloseMessage)
at Renci.SshNet.Channels.Channel.Close(Boolean)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean)
at Renci.SshNet.Channels.Channel.Dispose(Boolean)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Finalize()
__This occurred just over 60 seconds _after_ the Dispose method on SftpClient was called which generated a very similar exception (handled and logged by my code):__
2013-02-16 15:41:32.9693 Error SftpFileTransfer Renci.SshNet.Common.SshConnectionException,Client not connected., at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendMessage(ChannelCloseMessage message)
at Renci.SshNet.Channels.Channel.Close(Boolean wait)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait)
at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing)
at Renci.SshNet.SftpClient.Dispose(Boolean disposing)
at Renci.SshNet.BaseClient.Dispose()
at BusinessObjects.SftpFileTransfer.DownloadFiles()
__It looks like ~SubsystemSession() is causing an attempt to send a message over the channel(!) due to the chaining of calls to the various Dispose() methods.__
Comments: ** Comment from web user: BeyersCronje **
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Renci.SshNet.Common.SshConnectionException
Stack:
at Renci.SshNet.Session.SendMessage(Renci.SshNet.Messages.Message)
at Renci.SshNet.Channels.Channel.SendMessage(Renci.SshNet.Messages.Connection.ChannelCloseMessage)
at Renci.SshNet.Channels.Channel.Close(Boolean)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean)
at Renci.SshNet.Channels.Channel.Dispose(Boolean)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Finalize()
__This occurred just over 60 seconds _after_ the Dispose method on SftpClient was called which generated a very similar exception (handled and logged by my code):__
2013-02-16 15:41:32.9693 Error SftpFileTransfer Renci.SshNet.Common.SshConnectionException,Client not connected., at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendMessage(ChannelCloseMessage message)
at Renci.SshNet.Channels.Channel.Close(Boolean wait)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait)
at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing)
at Renci.SshNet.SftpClient.Dispose(Boolean disposing)
at Renci.SshNet.BaseClient.Dispose()
at BusinessObjects.SftpFileTransfer.DownloadFiles()
__It looks like ~SubsystemSession() is causing an attempt to send a message over the channel(!) due to the chaining of calls to the various Dispose() methods.__
Comments: ** Comment from web user: BeyersCronje **
Yep I also have the same issue. See this [discussion thread](http://sshnet.codeplex.com/discussions/435430) for more info.
I would also say the impact of this bug is quite high as it causes the whole app to crash.