469,366 Members | 2,311 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

"An address incompatible with the requested protocol was used"

HI,
i am trying to create a simple UDP client application on the windows mobile using c# to send messages as data packets to a desktop pc. I am getting this error when deploy the application on windows mobile;

"An address incompatible with the requested protocol was used"
i am very new to windows mobile application development and this is partof my final year project. Can someone please give me some clues why i am getting this error? I need to solve this problem urgently

the bit of code that generates the error is as follows:

Expand|Select|Wrap|Line Numbers
  1. string packet = "Hello";
  2. byte[] data = System.Text.Encoding.ASCII.GetBytes(packet);
  3. client.Send(data, data.Length, "127.0.0.1", 50000);
Thanks is advance..

Channa

<edit by mod: use [code] and [quote] tags, not [b] and [u]>
Nov 15 '08 #1
4 10107
RedSon
5,000 Expert 4TB
The error you are getting indicates that the address 127.0.0.1 does not support UDP. If your phone is not network or ethernet compatible then sending data to the loopback will not work.

You should try using the WM 5 emulator instead of a real device, it can use your computers NIC to communicate with itself and the outside world.
Nov 17 '08 #2
The error you are getting indicates that the address 127.0.0.1 does not support UDP. If your phone is not network or ethernet compatible then sending data to the loopback will not work.

You should try using the WM 5 emulator instead of a real device, it can use your computers NIC to communicate with itself and the outside world.

Hi,

Thanks alot for your reply.I do use the emulator to test the application and never tried it with the actual device. and i tried both WM5 and WM6 emulators . i have installed the Virtual PC 2007 and Activesysnc to support the emulator to connect wiht NIC... this was sugested in one of the articles i red. but i am still getting the same error.... is there anything else that i have to do??? any configurations in the emulator or change the code????

Thanks in advance.......


Regards

Channa
Nov 19 '08 #3
RedSon
5,000 Expert 4TB
Can you connect to websites and other things from the emulator?
Nov 19 '08 #4
Can you connect to websites and other things from the emulator?
HI,

Yes i can browse internet from the emulator......

Regards

Channa
Nov 20 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Robert | last post: by
3 posts views Thread by Jaroslaw Zabiello | last post: by
21 posts views Thread by Steven T. Hatton | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.