Groups | Blog | Home
all groups > dotnet compact framework > october 2007 >

dotnet compact framework : TcpClient yields System.IO.FileNotFoundException ????


Sagaert Johan
10/28/2007 4:40:12 PM
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

Paul G. Tobey [eMVP]
10/29/2007 8:11:41 AM
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.

[quoted text, click to view]

Paul G. Tobey [eMVP]
10/29/2007 8:54:33 AM
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.

[quoted text, click to view]

Sagaert Johan
10/29/2007 4:48:02 PM
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
[quoted text, click to view]

AddThis Social Bookmark Button