ftpUriString = "ftp://" + textBox1.Text;
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(ftpUriString);
string ftpAccount = "ftp";//ftp账户
string ftpPwd = "123456";//ftp密码
request.Credentials = new NetworkCredential(ftpAccount, ftpPwd);
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
FtpWebResponse response = null;
try
{
MessageBox.Show("ABCDE");
response = (FtpWebResponse)request.GetResponse();
//return response;
MessageBox.Show("得到返回");
}
catch (WebException err)
{
MessageBox.Show(err.ToString());
}
每次走到 response = (FtpWebResponse)request.GetResponse();
就卡住。什么原因呢?????
急急急
谢谢
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(ftpUriString);
string ftpAccount = "ftp";//ftp账户
string ftpPwd = "123456";//ftp密码
request.Credentials = new NetworkCredential(ftpAccount, ftpPwd);
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
FtpWebResponse response = null;
try
{
MessageBox.Show("ABCDE");
response = (FtpWebResponse)request.GetResponse();
//return response;
MessageBox.Show("得到返回");
}
catch (WebException err)
{
MessageBox.Show(err.ToString());
}
每次走到 response = (FtpWebResponse)request.GetResponse();
就卡住。什么原因呢?????
急急急
谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货