IPv4 remote address in WCF

后端 未结 5 1168
忘了有多久
忘了有多久 2020-12-19 01:24

Related to How to get the IP address of a WCF remote endpoint?

I am using this code to retrieve the remote IP address when a workflow method is invoked:



        
5条回答
  •  盖世英雄少女心
    2020-12-19 02:11

    You could use AddressFamily.InterNetwork == address.AddressFamily and AddressFamily.InterNetworkV6 as a test instead of looking for ":" or "." in the addresses strings.

提交回复
热议问题