<p>Hi when I Using this Code In VS2010 it's Work fine, But when I run it outside VS2010</p>
<p>the proccess stuck on the command UploadFile and I need to stop the proccess, and I can see</p>
<p>that the file uploaded to the server</p>
<p> </p>
<p>sftp.Connect();</p>
<p> </p>
<p> using (var file = File.OpenRead(localFileName))</p>
<p> {</p>
<p> sftp.UploadFile(remoteFileName, file);</p>
<p> }</p>
<p> </p>
<p> sftp.Disconnect();</p>
<p> </p>
<p>and there is no exception.</p>
<p> </p>
<p>Any suggestion?</p>
<p> </p>
<p>Thanks</p>
Comments: ** Comment from web user: olegkap **
<p>the proccess stuck on the command UploadFile and I need to stop the proccess, and I can see</p>
<p>that the file uploaded to the server</p>
<p> </p>
<p>sftp.Connect();</p>
<p> </p>
<p> using (var file = File.OpenRead(localFileName))</p>
<p> {</p>
<p> sftp.UploadFile(remoteFileName, file);</p>
<p> }</p>
<p> </p>
<p> sftp.Disconnect();</p>
<p> </p>
<p>and there is no exception.</p>
<p> </p>
<p>Any suggestion?</p>
<p> </p>
<p>Thanks</p>
Comments: ** Comment from web user: olegkap **
Please take a look at 22089 commit. I changed default buffer size to be smaller to avoid this and Isuspect possible few other issues.