DNS解决错误. [英] DNS Resolve Error .

查看:168
本文介绍了DNS解决错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此先感谢,

使用已过时的方法"Dns.Resolve"时出现错误

 BuildConnection(Dns.Resolve(ServerAddr).AddressList( 0 ),FtpPort)
System.Net.Sockets.SocketException:所请求的名称 有效,但没有数据 找到



使用GetHostEntry时会出现此错误

BuildConnection(Dns.GetHostEntry(ServerAddr).AddressList(0),FtpPort)
System.Net.Sockets.SocketException:没有这样的主机是已知的


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





任何建议将不胜感激.方法以及正在接收什么结果.


Thanks in advance ,

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

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.

解决方案

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.


这篇关于DNS解决错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆