public bool isResolvableEx(string host)
{
GlobalLog.Print("WebProxyScriptHelper::dnsResolveEx() host:" + ValidationHelper.ToString(host));
if (host == null)
{
if (Logging.On)
{
Logging.PrintWarning(Logging.Web, SR.GetString(SR.net_log_proxy_called_with_null_parameter, "WebProxyScriptHelper.dnsResolve()", "host"));
}
throw new ArgumentNullException("host");
}
IPHostEntry ipHostEntry = null;
try
{
ipHostEntry = Dns.InternalGetHostByName(host);
}
catch { }
if (ipHostEntry == null)
{
return(false);
}
IPAddress[] addresses = ipHostEntry.AddressList;
if (addresses.Length == 0)
{
return(false);
}
return(true);
}