TcpClient yields System.IO.FileNotFoundException ????

S

Sagaert Johan

Hi ;

Why do i get an System.IO.FileNotFoundException on this :


TcpClient cl=new TcpClient();

cl.Connect("192.168.1.80", 7777);


The connection succeeds but only after throwing an
System.IO.FileNotFoundException after some seconds.

Whats wrong ? is this a CF2.0 bug ?

Johan
 
P

Paul G. Tobey [eMVP]

Try making that first parameter an IPAddress. Connect will interpret a
string there as a host *name*, not an IP address. It's obviously figuring
it out but, if you want to speed it up, you should use your knowledge about
the parameter to pass the right type!

Paul T.
 
S

Sagaert Johan

Could it be the CF looks for a Hosts file ?



"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...
 
P

Paul G. Tobey [eMVP]

Windows CE doesn't look for a hosts *file*, so I don't think so, but I don't
have the source, so anything is possible.

Paul T.

Sagaert Johan said:
Could it be the CF looks for a Hosts file ?



"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...
Try making that first parameter an IPAddress. Connect will interpret a
string there as a host *name*, not an IP address. It's obviously
figuring it out but, if you want to speed it up, you should use your
knowledge about the parameter to pass the right type!

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top