Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Thanks in advance ,

I am getting error when using "Dns.Resolve" which is an obsoleted method

VB
BuildConnection(Dns.Resolve(ServerAddr).AddressList(0), FtpPort)
		System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found


when using GetHostEntry then this error is coming

BuildConnection(Dns.GetHostEntry(ServerAddr).AddressList(0), FtpPort)
System.Net.Sockets.SocketException: No such host is known


    Private Sub BuildConnection(ByVal ServerAddr As IPAddress, ByVal FtpPort As Int32)
end sub




any suggestion will be appreciated.
Posted

1 solution

Why not separate your Dns method calls and use your debugger to step through them and check exactly what data you are presenting to the method and what results are being received.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900