473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

No such host is known

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

Nov 18 '05 #1
2 8668
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)

"Guoqi Zheng" <no@sorry.nl> wrote in message
news:uJ**************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #2
you can do a dns lookup. this will not validate the port, login, and
password though.

-- bruce (sqlwork.com)


"Guoqi Zheng" <no@sorry.nl> wrote in message
news:uJ**************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Martin Plantec | last post by:
Hello, I have managed (with your help!) to make a working XSLT stylesheet; it works fine locally (Windows Apache + PHP with Sablotron 1.0), but it fails on the remote host (FreeBSD Apache + PHP...
0
by: Johann Blake | last post by:
I am using the TcpClient to connect to a web site. I then open a NetworkStream and read the contents that are being sent back. The problem is that I have no idea when the remote host is finished...
4
by: Marc-André | last post by:
I would like to find a simple way to test if a computer is online. I found a lot of code on internet about using existing ping class...but the code was not looking really good. There must be a...
0
by: Durai | last post by:
Hello All, I built postgresql on HPUX IPF(11.22) platform. It works fine. But I have warning message "could not resolve "localhost": host nor service provided, or not known" when I start the...
0
by: jholmes1 | last post by:
I have been using the ShellApplication object in an ASP script to retrieve some file characteristics that the FileSystem object does not access (this is one of my clients' sites on a commercial...
0
by: stigip | last post by:
I'm having a problem with hosting a web service on a server behind a reverse proxy. When the IIS/.Net Framework is generating the test page for a WebMethod in the .asmx-file it uses an absolute...
7
by: Adam | last post by:
Hello. I do most of my web dev work from a Mac (whose file system is case-insensitive.) I upload my web pages and other files onto a Unix-based host, which is case sensitive. When I look at the...
1
by: Object01 | last post by:
Are there any known issues regarding the use of Request.Url.Host on an SSL-enabled site? Requests for my application are of the form http://abc.com/myPage.aspx, but Request.Url.Host returns...
0
by: vinothPHP | last post by:
Hi Everyone, I want to make a crawler in php that will crawl site search results by images, links. when i am running the sample script in my localhost i am getting this error,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.