tamir.sharpssh 的问题。 我用tamir.sharpssh连接SFTP,偶尔会出现Unable to write data to the transport connection,是什么问题呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 没有人遇到过吗,操作SFTP类似的情况,也可以说说啊 using System;using Tamir.SharpSsh;namespace SFTP{ /// <summary> /// Summary description for SFTPHelper. /// </summary> public class SFTPHelper { private SFTPHelper() { } private SshTransferProtocolBase m_sshCp; public bool Connected { get { return m_sshCp.Connected; } } public SFTPHelper(SshConnectionInfo connectionInfo) { // //TODO: Check connectionInfo // m_sshCp = new Sftp(connectionInfo.Host,connectionInfo.User); if(connectionInfo.Pass != null) { m_sshCp.Password = connectionInfo.Pass; } if(connectionInfo.IdentityFile != null) { m_sshCp.AddIdentityFile(connectionInfo.IdentityFile ); } } public void Connect() { if(!m_sshCp.Connected) { m_sshCp.Connect(); } } public void Close() { if(m_sshCp.Connected) { m_sshCp.Close(); } } public bool Upload(string localPath,string remotePath) { try { if(!m_sshCp.Connected) { m_sshCp.Connect(); } m_sshCp.Put(localPath, remotePath); return true; } catch { return false; } } public bool Download(string remotePath,string localPath) { try { if(!m_sshCp.Connected) { m_sshCp.Connect(); } m_sshCp.Get(remotePath,localPath); return true; } catch { return false; } } }} http://blog.csdn.net/changezhong/archive/2007/01/30/1498073.aspx 贝塞尔曲线 在VS2010中安装控件后仍无法使用 求助!对XML的修改 数据库、遇到点问题 关于 Socket UDP 问题(公网上UDP通讯)^^^^^^^(100分) 怎么写一个windows服务和应用程序,让他们之间可以互相写读数据。 我的程序名是aaa.exe ,现在在运行中使用aaa.exe -i ,怎么得到-i这个参数?? 有沒辦法直接判斷xml里有無某個節點 请各位大虾帮帮忙! 如何是listbox中的item达到一定数目的时候自动清空。?? 求好的想法? 请问wpf窗口绑定速度太慢,怎么解决!
using System;
using Tamir.SharpSsh;namespace SFTP
{
/// <summary>
/// Summary description for SFTPHelper.
/// </summary>
public class SFTPHelper
{
private SFTPHelper()
{
} private SshTransferProtocolBase m_sshCp; public bool Connected
{
get
{
return m_sshCp.Connected;
}
}
public SFTPHelper(SshConnectionInfo connectionInfo)
{
//
//TODO: Check connectionInfo
// m_sshCp = new Sftp(connectionInfo.Host,connectionInfo.User); if(connectionInfo.Pass != null)
{
m_sshCp.Password = connectionInfo.Pass;
} if(connectionInfo.IdentityFile != null)
{
m_sshCp.AddIdentityFile(connectionInfo.IdentityFile );
}
} public void Connect()
{
if(!m_sshCp.Connected)
{
m_sshCp.Connect();
}
} public void Close()
{
if(m_sshCp.Connected)
{
m_sshCp.Close();
}
} public bool Upload(string localPath,string remotePath)
{
try
{
if(!m_sshCp.Connected)
{
m_sshCp.Connect();
}
m_sshCp.Put(localPath, remotePath); return true;
}
catch
{
return false;
} } public bool Download(string remotePath,string localPath)
{
try
{
if(!m_sshCp.Connected)
{
m_sshCp.Connect();
} m_sshCp.Get(remotePath,localPath); return true;
}
catch
{
return false;
}
}
}
}