locked
Get IPV4 address of a IPV6 client ? RRS feed

  • Question

  • Hello,

    I have a WCF server (v4) running on windows XP computer which has IPV4 installed.

    When a WCF client running on Windows 7 connects to this server

    the following code:

    RemoteEndpointMessageProperty endpointProperty =messageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;

    endpointProperty.Address

    gives me an IPV6 address which my Windows XP server is unable to understand (I need to know this address to conect to an old protocol running on the client machine).

     

    My current workaround is to create a duplex channel and then the client implement a callback to give his IPV4 address to my server.

    but if there is several IP addresses on my client this may fail.

     

    Is there a way to get the real IPV4 address used like in any TCP based socket?

    regards

    Tuesday, April 26, 2011 5:31 PM

Answers

  • Hello, I don't think there's anything you can do on the WCF side. You'll see the same behavior if you work with a non-WCF but network related task. I suggest you to either support IPv6 on the XP machine, or disable IPv6 on the Windows 7 machine. You can also try to configure 6to4 on your router.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Tuesday, May 3, 2011 9:09 AM
    Thursday, April 28, 2011 1:22 AM

All replies

  • In hybrid mode, the IPv4 address is the last 4 bytes of the IPv6 address, but I believe Windows XP does not use a hybrid v4/v6 stack, so that may not work.

    Tuesday, April 26, 2011 8:58 PM
  • Hello, I don't think there's anything you can do on the WCF side. You'll see the same behavior if you work with a non-WCF but network related task. I suggest you to either support IPv6 on the XP machine, or disable IPv6 on the Windows 7 machine. You can also try to configure 6to4 on your router.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Tuesday, May 3, 2011 9:09 AM
    Thursday, April 28, 2011 1:22 AM