Socket problem / DNS resoulution - Unknown Host

R

Ralf Haenel

Hello,

I have a problem to establish a socket connection with the CF

I have the following shortest sample, wich running fine with the emulator
but fails on the real device (Ipaq or CASIO DT-X10M10E)

The "192.168.69.2 Port 39064" is a Server in the local network.

---------------------------------------
Try
Dim client As New TcpClient("192.168.69.2", 39064)
Catch ex As SocketException
MessageBox.Show("ERROR:" + ex.Message)
End Try
---------------------------------------

The error message is:

"ERROR: This is usually a temp error during hostname resolution an means
that the local server did not response from an authoritative server"

BUT: The DNS will success, if I use the InternetExplorer on the PDA !?


Thanx for help

Regards,
Ralf
 
D

Daniel Moth

So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use SocketException.ErrorCode to
obtain the specific error code. Once you have obtained this code, you can
refer to the Windows Socket Version 2 API error code documentation in MSDN
for a detailed description of the error.

Cheers
Daniel
 
R

Ralf Haenel

Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is usually a
temporary error during host name resolution and means that the local server
did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf
 
S

Sergey Bogdanov

Ensure that you have set the correct network mask for your device. Also
run command line (if you have WindowsCE) and ping 192.168.69.2. If you
can't do it, you can install to 192.168.69.2 Web Server and try to open
it through Internet Explorer from your device to ensure that IP address
is available.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf said:
Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is usually a
temporary error during host name resolution and means that the local server
did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf



So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use SocketException.ErrorCode to
obtain the specific error code. Once you have obtained this code, you can
refer to the Windows Socket Version 2 API error code documentation in MSDN
for a detailed description of the error.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/



emulator
 
R

Ralf Haenel

Okay

I can't ping the server.

The webserver on the "192.168.69.2" is reachable.

But I can't find a possibility to change the network settings



Thank you for the answer.

Regards,
Ralf





Sergey Bogdanov said:
Ensure that you have set the correct network mask for your device. Also
run command line (if you have WindowsCE) and ping 192.168.69.2. If you
can't do it, you can install to 192.168.69.2 Web Server and try to open
it through Internet Explorer from your device to ensure that IP address
is available.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf said:
Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is usually a
temporary error during host name resolution and means that the local server
did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf



So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use SocketException.ErrorCode to
obtain the specific error code. Once you have obtained this code, you can
refer to the Windows Socket Version 2 API error code documentation in MSDN
for a detailed description of the error.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/



Hello,

I have a problem to establish a socket connection with the CF

I have the following shortest sample, wich running fine with the
emulator

but fails on the real device (Ipaq or CASIO DT-X10M10E)

The "192.168.69.2 Port 39064" is a Server in the local network.

---------------------------------------
Try
Dim client As New TcpClient("192.168.69.2", 39064)
Catch ex As SocketException
MessageBox.Show("ERROR:" + ex.Message)
End Try
---------------------------------------

The error message is:

"ERROR: This is usually a temp error during hostname resolution an means
that the local server did not response from an authoritative server"

BUT: The DNS will success, if I use the InternetExplorer on the PDA !?


Thanx for help

Regards,
Ralf
 
S

Sergey Bogdanov

Aha! Then try this:

IPAddress ipAddress = IPAddress.Parse("192.168.69.2");
TcpClient client = new TcpClient();
client.Connect(new IPEndPoint(ipAddress, 39064));

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf said:
Okay

I can't ping the server.

The webserver on the "192.168.69.2" is reachable.

But I can't find a possibility to change the network settings



Thank you for the answer.

Regards,
Ralf





Ensure that you have set the correct network mask for your device. Also
run command line (if you have WindowsCE) and ping 192.168.69.2. If you
can't do it, you can install to 192.168.69.2 Web Server and try to open
it through Internet Explorer from your device to ensure that IP address
is available.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf said:
Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is usually a
temporary error during host name resolution and means that the local
server
did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf





So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use SocketException.ErrorCode
to
obtain the specific error code. Once you have obtained this code, you
can
refer to the Windows Socket Version 2 API error code documentation in
MSDN
for a detailed description of the error.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/




Hello,

I have a problem to establish a socket connection with the CF

I have the following shortest sample, wich running fine with the

emulator


but fails on the real device (Ipaq or CASIO DT-X10M10E)

The "192.168.69.2 Port 39064" is a Server in the local network.

---------------------------------------
Try
Dim client As New TcpClient("192.168.69.2", 39064)
Catch ex As SocketException
MessageBox.Show("ERROR:" + ex.Message)
End Try
---------------------------------------

The error message is:

"ERROR: This is usually a temp error during hostname resolution an
means
that the local server did not response from an authoritative server"

BUT: The DNS will success, if I use the InternetExplorer on the PDA !?


Thanx for help

Regards,
Ralf
 
R

Ralf Haenel

Hi Sergey,

your code works fine, thank you. And tomorrow I try to understand the
difference.

Best Regards,
Ralf Haenel


Sergey Bogdanov said:
Aha! Then try this:

IPAddress ipAddress = IPAddress.Parse("192.168.69.2");
TcpClient client = new TcpClient();
client.Connect(new IPEndPoint(ipAddress, 39064));

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf said:
Okay

I can't ping the server.

The webserver on the "192.168.69.2" is reachable.

But I can't find a possibility to change the network settings



Thank you for the answer.

Regards,
Ralf





Ensure that you have set the correct network mask for your device. Also
run command line (if you have WindowsCE) and ping 192.168.69.2. If you
can't do it, you can install to 192.168.69.2 Web Server and try to open
it through Internet Explorer from your device to ensure that IP address
is available.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf Haenel wrote:

Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is usually a
temporary error during host name resolution and means that the local
server

did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf





So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use SocketException.ErrorCode
to

obtain the specific error code. Once you have obtained this code, you
can

refer to the Windows Socket Version 2 API error code documentation in
MSDN

for a detailed description of the error.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/




Hello,

I have a problem to establish a socket connection with the CF

I have the following shortest sample, wich running fine with the

emulator


but fails on the real device (Ipaq or CASIO DT-X10M10E)

The "192.168.69.2 Port 39064" is a Server in the local network.

---------------------------------------
Try
Dim client As New TcpClient("192.168.69.2", 39064)
Catch ex As SocketException
MessageBox.Show("ERROR:" + ex.Message)
End Try
---------------------------------------

The error message is:

"ERROR: This is usually a temp error during hostname resolution an
means

that the local server did not response from an authoritative server"

BUT: The DNS will success, if I use the InternetExplorer on the PDA !?


Thanx for help

Regards,
Ralf
 
A

Alex Feinman [MVP]

The difference is that new TcpClient("192.168.1.1", 80) tries to call
Dns.GetHostByName while using IPAddress.Parse creates an address that can be
used directly, without trying to use DNS

--
Alex Feinman
---
Visit http://www.opennetcf.org
Ralf Haenel said:
Hi Sergey,

your code works fine, thank you. And tomorrow I try to understand the
difference.

Best Regards,
Ralf Haenel


Sergey Bogdanov said:
Aha! Then try this:

IPAddress ipAddress = IPAddress.Parse("192.168.69.2");
TcpClient client = new TcpClient();
client.Connect(new IPEndPoint(ipAddress, 39064));

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf said:
Okay

I can't ping the server.

The webserver on the "192.168.69.2" is reachable.

But I can't find a possibility to change the network settings



Thank you for the answer.

Regards,
Ralf






Ensure that you have set the correct network mask for your device. Also
run command line (if you have WindowsCE) and ping 192.168.69.2. If you
can't do it, you can install to 192.168.69.2 Web Server and try to open
it through Internet Explorer from your device to ensure that IP address
is available.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf Haenel wrote:

Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is usually a
temporary error during host name resolution and means that the local

server

did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf





So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use
SocketException.ErrorCode

to

obtain the specific error code. Once you have obtained this code, you

can

refer to the Windows Socket Version 2 API error code documentation in

MSDN

for a detailed description of the error.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/




Hello,

I have a problem to establish a socket connection with the CF

I have the following shortest sample, wich running fine with the

emulator


but fails on the real device (Ipaq or CASIO DT-X10M10E)

The "192.168.69.2 Port 39064" is a Server in the local network.

---------------------------------------
Try
Dim client As New TcpClient("192.168.69.2", 39064)
Catch ex As SocketException
MessageBox.Show("ERROR:" + ex.Message)
End Try
---------------------------------------

The error message is:

"ERROR: This is usually a temp error during hostname resolution an

means

that the local server did not response from an authoritative server"

BUT: The DNS will success, if I use the InternetExplorer on the PDA !?


Thanx for help

Regards,
Ralf
 
R

Ralf Haenel

Hello,
The difference is that new TcpClient("192.168.1.1", 80) tries to call
Dns.GetHostByName while using IPAddress.Parse creates an address that can be
used directly, without trying to use DNS

Thank you all for yout help :)

Kind Regards,
Ralf

--
Alex Feinman
---
Visit http://www.opennetcf.org
Ralf Haenel said:
Hi Sergey,

your code works fine, thank you. And tomorrow I try to understand the
difference.

Best Regards,
Ralf Haenel


Sergey Bogdanov said:
Aha! Then try this:

IPAddress ipAddress = IPAddress.Parse("192.168.69.2");
TcpClient client = new TcpClient();
client.Connect(new IPEndPoint(ipAddress, 39064));

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf Haenel wrote:
Okay

I can't ping the server.

The webserver on the "192.168.69.2" is reachable.

But I can't find a possibility to change the network settings



Thank you for the answer.

Regards,
Ralf






Ensure that you have set the correct network mask for your device. Also
run command line (if you have WindowsCE) and ping 192.168.69.2. If you
can't do it, you can install to 192.168.69.2 Web Server and try to open
it through Internet Explorer from your device to ensure that IP address
is available.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Ralf Haenel wrote:

Hello,

Thank you for your answer.

I did so, but I still don't understand the problem.


The code is 11002

[MSDN]
11002 = WSATRY_AGAIN= Nonauthoritative host not found. This is
usually
a
temporary error during host name resolution and means that the local

server

did not receive a response from an authoritative server. A retry at some
time later may be successful.

It seems that I have a DNS Problem but the IE will work?



Regards Ralf





So is there something listening on port 39064?

Also:
Note If you receive a SocketException, use
SocketException.ErrorCode

to

obtain the specific error code. Once you have obtained this code, you

can

refer to the Windows Socket Version 2 API error code documentation in

MSDN

for a detailed description of the error.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/




Hello,

I have a problem to establish a socket connection with the CF

I have the following shortest sample, wich running fine with the

emulator


but fails on the real device (Ipaq or CASIO DT-X10M10E)

The "192.168.69.2 Port 39064" is a Server in the local network.

---------------------------------------
Try
Dim client As New TcpClient("192.168.69.2", 39064)
Catch ex As SocketException
MessageBox.Show("ERROR:" + ex.Message)
End Try
---------------------------------------

The error message is:

"ERROR: This is usually a temp error during hostname resolution an

means

that the local server did not response from an authoritative server"

BUT: The DNS will success, if I use the InternetExplorer on the
PDA
!?
Thanx for help

Regards,
Ralf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top