https://bugzilla.novell.com/show_bug.cgi?id=392051


           Summary: Validating "DNS" name using System.Net.Dns.GetHostByName
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: SLED 10
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: Development


I am trying to validate DNS name as follows:

IPHostEntry host = nil;

try
{
 host = Dns.GetHostByName(ipstring); //ipstring is declared as string which
holds "192.168.80"
 foreach (IPAddress ip in host.AddressList)
 {
   log.Info("{0} is the IP Address",ip); 
 }
}
catch(Exception ex)
{
 log.Info("Invalid DNS Name {0}",ex.Message);
}

As per the functionality of GetHostByName, it must fail. But it is logging IP
address as "192.168.0.80 is IP Address" instead of throwing exception.
Please let me know the correct API to proceed.

Note: I am not talking about Dns.GetHostByAddress(IPAddress) method.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to