Hi everyone!
I am experiencing a problem when trying to establish a TCP connection
between a
program running locally and another program running on the Pocket PC
emulator
provided by the .NET 2003 environment.
TCP listener:
try {
TcpListener listener;
listener = new TcpListener(IPAddress.Any, 8000);
listener.Start();
while (true)
{
Socket connection = listener.AcceptSocket();
...
} } catch (Exception ...) {...}
TCP client:
TcpClient client;
try
{
client = new TcpClient("localhost", 8000);
...
} catch (...) {...}
I started the first program (with the TCP listener), and then started
the second
one in the .NET IDE with the pocket PC emulator as the target for
deployment. Then
an exception was caught:
"No connection could be made because the target machine actively
refused it."
Can any one tell me how to fix this problem? Many thanks!