No such host is known

  • Thread starter Thread starter Guoqi Zheng
  • Start date Start date
G

Guoqi Zheng

This is an email application. I need to connect to the pop server user
specify. However, when they input an invalide host name, they will get an
error message saying that No such host is known.

How can I validate the host and give them an predefined error message to
correct it?

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 
handle the exception thrown when the user enters a wrong host name

try
{
// your code
}
catch(Exception ex)
{
// whatever way you wish to handle the error
}

--

Regards,

Hermit Dave (D'way)
http://hdave.blogspot.com

(I hear what you're saying.. but lets try it my way first)
 
you can do a dns lookup. this will not validate the port, login, and
password though.

-- bruce (sqlwork.com)
 
Back
Top