SocketException连接到SFTP服务器名称是有效的,但请求类型的数据发现 [英] SocketException connecting to SFTP server: name is valid, but no data of the requested type was found
问题描述
我想用SharpSsh库连接我的SFTP服务器,但我发现了以下错误:
I am trying to connect my sftp server using SharpSsh library, but I'm getting following error:
System.Net.Sockets.SocketException (0x80004005):
The requested name is valid, but no data of the requested type was found
我使用下面的code连接
I am using following code for connection
Tamir.SharpSsh.Sftp sftp = new Tamir.SharpSsh.Sftp("ftp.simptr.us", "username", "password");
为什么这个异常被抛出?
Why is this exception being thrown?
推荐答案
此错误消息的Winsock相关 WSANO_DATA
错误code。这意味着,有一些问题,你正在试图连接到该域名的DNS记录。
This error message is associated with Winsock WSANO_DATA
error code. It means, there is some problem with DNS record of the domain name you are trying to connect to.
另请参见
的http://msdn.microsoft.com/en-us/library/windows/desktop/ms740668%28v=vs.85%29.aspx#WSANO_DATA
这是不可能的,这是关系到SharpSsh库。
It is unlikely this is related to SharpSsh library.
尝试远程登录验证,你应该得到同样的错误:
Try to telnet to verify, you should get the same error:
telnet ftp.simptr.us 22
这篇关于SocketException连接到SFTP服务器名称是有效的,但请求类型的数据发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!