M
Morten Nielsen
I'm trying to connect to server via TcpClient, but gets the following error:
"This is usually a temporary error during hostname resolution and means that
the local server did not receive a response from an authorative server."
The code has been tested in a Windows Application and works fine. I can also
connect to the IP address via Pocket Internet Explorer, so connection should
be fine. I connect via GPRS (which I also have tested to be ok), but it
seems that the error is the same whether or not I have an active internet
connection.
Any idea on what could be wrong?
Code that fails:
-------------------------
TcpClient client;
try
{
client = new TcpClient("129.217.182.51",80); //This one fails
}
catch(System.Exception ex)
{
MessageBox.Show("Error connecting to server:" + ex.Message);
return;
}
-------------------------
I have also tried
IPHostEntry remoteHost = Dns.Resolve("129.217.182.51");
which creates the same error.
Any help or suggestions appreciated
Regards
/Morten Nielsen (email: http://www.iter.dk/contact.aspx )
Implementing GPS in your Pocket PC app?
http://www.iter.dk/software/PocketGpsLib
"This is usually a temporary error during hostname resolution and means that
the local server did not receive a response from an authorative server."
The code has been tested in a Windows Application and works fine. I can also
connect to the IP address via Pocket Internet Explorer, so connection should
be fine. I connect via GPRS (which I also have tested to be ok), but it
seems that the error is the same whether or not I have an active internet
connection.
Any idea on what could be wrong?
Code that fails:
-------------------------
TcpClient client;
try
{
client = new TcpClient("129.217.182.51",80); //This one fails
}
catch(System.Exception ex)
{
MessageBox.Show("Error connecting to server:" + ex.Message);
return;
}
-------------------------
I have also tried
IPHostEntry remoteHost = Dns.Resolve("129.217.182.51");
which creates the same error.
Any help or suggestions appreciated
Regards
/Morten Nielsen (email: http://www.iter.dk/contact.aspx )
Implementing GPS in your Pocket PC app?
http://www.iter.dk/software/PocketGpsLib