Sorry if this is a repost, I don't think the first on sent.

I have made a program that runs on a .net PocketPC that talks over a
wireless network with a server running a program that is not written in
.net. The program works fine here, but gives an error message of "No
such host is known" at the customers location. I do not think they have
a DNS server at their place. In csharp how do you connect with TCP to a
server without causing a DNS lookup. Here is the code I am using now.
Not that ServerAddr is a string containing the valid IPAddress of the
server.

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);


I can give you the output of IPConfig run from the server if it will
help. Also I can ping the server from the pocketPC so I know it can see
it.

Re: No DNS server by Paul

Paul
Tue May 11 18:22:42 CDT 2004

Posted and responded to previously.

Paul T.

"Joe Bain" <JBAIN.nospm@nospan.addonsystems.com> wrote in message
news:O9CQeH6NEHA.2708@TK2MSFTNGP10.phx.gbl...
> Sorry if this is a repost, I don't think the first on sent.
>
> I have made a program that runs on a .net PocketPC that talks over a
> wireless network with a server running a program that is not written in
> .net. The program works fine here, but gives an error message of "No
> such host is known" at the customers location. I do not think they have
> a DNS server at their place. In csharp how do you connect with TCP to a
> server without causing a DNS lookup. Here is the code I am using now.
> Not that ServerAddr is a string containing the valid IPAddress of the
> server.
>
> 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);
>
>
> I can give you the output of IPConfig run from the server if it will
> help. Also I can ping the server from the pocketPC so I know it can see
> it.



Re: No DNS server by Lloyd

Lloyd
Tue May 11 19:20:19 CDT 2004

I don't understand your question,
what's wrong with
IPAddress ia = IPAddress.Parse(ipAddressString);
IPEndPoint iep = new IPEndPoint(ia, port);

??

and it does work on PPC !

--
ihookdb
Get your data mobile
http://www.ihookdb.com


"Joe Bain" <JBAIN.nospm@nospan.addonsystems.com> wrote in message
news:O9CQeH6NEHA.2708@TK2MSFTNGP10.phx.gbl...
> Sorry if this is a repost, I don't think the first on sent.
>
> I have made a program that runs on a .net PocketPC that talks over a
> wireless network with a server running a program that is not written in
> .net. The program works fine here, but gives an error message of "No
> such host is known" at the customers location. I do not think they have
> a DNS server at their place. In csharp how do you connect with TCP to a
> server without causing a DNS lookup. Here is the code I am using now.
> Not that ServerAddr is a string containing the valid IPAddress of the
> server.
>
> 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);
>
>
> I can give you the output of IPConfig run from the server if it will
> help. Also I can ping the server from the pocketPC so I know it can see
> it.



Re: No DNS server by William

William
Tue May 11 22:55:28 CDT 2004

Don't do the GetHostByAddress step. Just use a fixed IP like
IPAddress.Parse("1.1.1.1") and give that IP to your EndPoint.

--
William Stacey, MVP

"Joe Bain" <JBAIN.nospm@nospan.addonsystems.com> wrote in message
news:O9CQeH6NEHA.2708@TK2MSFTNGP10.phx.gbl...
> Sorry if this is a repost, I don't think the first on sent.
>
> I have made a program that runs on a .net PocketPC that talks over a
> wireless network with a server running a program that is not written in
> .net. The program works fine here, but gives an error message of "No
> such host is known" at the customers location. I do not think they have
> a DNS server at their place. In csharp how do you connect with TCP to a
> server without causing a DNS lookup. Here is the code I am using now.
> Not that ServerAddr is a string containing the valid IPAddress of the
> server.
>
> 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);
>
>
> I can give you the output of IPConfig run from the server if it will
> help. Also I can ping the server from the pocketPC so I know it can see
> it.