Reputation: 5597
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
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?
Upvotes: 1
Views: 7170
Reputation: 202642
This error message is associated with the Winsock WSANO_DATA
error code. It means, there is some problem with DNS record of the domain name you are trying to connect to.
See also
https://learn.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2#WSANO_DATA
It is unlikely this is related to the SharpSsh library.
Try to telnet to verify, you should get the same error:
telnet ftp.simptr.us 22
Upvotes: 2