473,387 Members | 1,578 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,387 software developers and data experts.

Validating IP Address in machine contest, howto?

K0
Hi all!

I have a small app that opens a port on one of its IP Addresses. The address
comes from DB Table. The problem is, if the address is incorrect, when i
pass it to a TcpListener a socketexception is raised (IP Address not valid
in context...).

Is there a way for me to check the validity of the IP Address BEFORE
actually trying to open the listener?

Thanx to Anyone answering

bye
Jul 21 '05 #1
1 1858
You might try writing some "ping" code.

Here is an example that might help.
http://www.christopherlewis.com/Ping.cs.htm

"K0" <k0@k0.com> wrote in message
news:qB**********************@news1.tin.it...
Hi all!

I have a small app that opens a port on one of its IP Addresses. The address comes from DB Table. The problem is, if the address is incorrect, when i
pass it to a TcpListener a socketexception is raised (IP Address not valid
in context...).

Is there a way for me to check the validity of the IP Address BEFORE
actually trying to open the listener?

Thanx to Anyone answering

bye

Jul 21 '05 #2

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

Similar topics

5
by: The Plankmeister | last post by:
Hi... What's the best method of validating input characters? I would like to prevent users submitting exotic characters (such as those acquired on Windows Systems by pressing ALT+) and thought...
15
by: qazmlp | last post by:
What is the best & fastest way of validating an IPv4 address? Basically, the input can be either in IPAddressv4 or IPAddressv4:port format. Currently I have the following code to validate the...
2
by: ArunPrakash | last post by:
Hi All, I have a case where i need to validate if the email address is valid before i send a mail. for this there are 2 parts.. * check the format of mail address - this is done * check the...
2
by: Chris Dunaway | last post by:
I have a form with a textbox and numerous panels, buttons and other controls. I have handled the textbox Validating and Validated events. The textbox will hold a filename. In the validating...
1
by: K0 | last post by:
Hi all! I have a small app that opens a port on one of its IP Addresses. The address comes from DB Table. The problem is, if the address is incorrect, when i pass it to a TcpListener a...
1
by: Curious | last post by:
Hi, I will be reading a series of XML files, and before extracting the data from them, I would like to make sure that they have the correct schema. The schema will be readily available into an...
0
by: Tom 7 | last post by:
Language lovers: Registration is now open for the 9th Annual ICFP Programming Contest! http://icfpcontest.org/ The contest, associated with the International Conference on Functional...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
2
by: SONIQ | last post by:
Using javascripts to validate this form. Basic operation, when a user clicks the submit order button, the javascript code must validate everything entered by the user. Please help finnish this...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.