FtpWebResponse,操作超时

我想根据他们的日期时间从ftp服务器下载文件..我可以从CuteFtp第三方访问这个Ftp,而且每件事都是Okey ..但是当我在GetRespone()行运行下面的代码时,我收到此错误:操作已经超时。 我用webclient requet以编程方式从这个FTP下载了一个示例文件,它很好..但是我需要使用FtpWebRequest来获取listDirectoryDe​​tail而webClient不支持那个……还有一件事,请求中有一个exception: FtpWebRequest.ContentType抛出了System.NotSupportedException类型的exception。

这是我的代码:

 Uri uri = new Uri("ftp://192.168.1.5:2100/");//the private address if (uri.Scheme != Uri.UriSchemeFtp) { return; } FtpWebRequest reqFTP; reqFTP = (FtpWebRequest)WebRequest.Create(uri); reqFTP.Credentials = new NetworkCredential("myuser", "mypass"); reqFTP.KeepAlive = false; reqFTP.Method = WebRequestMethods.Ftp.ListDirectoryDetails; reqFTP.UseBinary = true; reqFTP.Proxy = null; reqFTP.UsePassive = false; FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); 

请帮忙 :(

我解决了我的问题!… UsePassive属性应该设置为True,当它为true时,客户端应该在数据端口上启动连接

 reqFTP.UsePassive = true;