J
Joe Bain
I have written a .net program that runs on a pocketPC that talks
wirelessly to a non .net program on a sever though sockets. The program
works fine on our network here, but on the customers it gets an
exception "No such host is known". I do not think their network has a
DNS server. Here is code I use to connect. The string ServerAddr is the
IP address of the server in string form.
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
socket.Blocking = true;
IPHostEntry IPHost = Dns.GetHostByAddress(IPAddress.Parse(ServerAddr));
string[] aliases = IPHost.Aliases;
IPAddress[] addr = IPHost.AddressList;
IPEndPoint ipepServer = new IPEndPoint(addr[0], Port);
socket.Connect(ipepServer);
If it would help I could give you the results of IPConfig when run from
the command line on the server. I can also ping the server from the
PocketPC so I know that it can see the server.
wirelessly to a non .net program on a sever though sockets. The program
works fine on our network here, but on the customers it gets an
exception "No such host is known". I do not think their network has a
DNS server. Here is code I use to connect. The string ServerAddr is the
IP address of the server in string form.
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
socket.Blocking = true;
IPHostEntry IPHost = Dns.GetHostByAddress(IPAddress.Parse(ServerAddr));
string[] aliases = IPHost.Aliases;
IPAddress[] addr = IPHost.AddressList;
IPEndPoint ipepServer = new IPEndPoint(addr[0], Port);
socket.Connect(ipepServer);
If it would help I could give you the results of IPConfig when run from
the command line on the server. I can also ping the server from the
PocketPC so I know that it can see the server.