PC Review


Reply
Thread Tools Rate Thread

Validating IP Address in machine contest, howto?

 
 
K0
Guest
Posts: n/a
 
      2nd Oct 2003
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


 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      2nd Oct 2003
You might try writing some "ping" code.

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

"K0" <(E-Mail Removed)> wrote in message
news:qBSeb.153686$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: List SQL Servers on Local Machine =?Utf-8?B?U2NvdHQ=?= Microsoft ADO .NET 8 19th Apr 2006 08:31 AM
howto restore a tape (ntbackup XP) to new machine -- no .bkf robertC Windows XP General 0 20th Apr 2004 06:00 AM
HOWTO add categorie in mail from a *nix machine google Microsoft Outlook Interoperability 2 29th Jan 2004 06:57 PM
Re: Howto map a win2000 shared drive on a mac client machine William M. Smith Microsoft Windows 2000 Macintosh 0 1st Oct 2003 03:44 AM
Re: Howto map a win2000 shared drive on a mac client machine John Microsoft Windows 2000 Macintosh 0 30th Sep 2003 12:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 PM.