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:
The workaround proposed by Murat will not work. The MSDN says - if you pass the IP address to the GetHostAddresses method this address is returned in an array without querying the DNS. To get it working you will need to query for the host name first, using GetHostEntry method. And then, using the host name, use GetHostAddresses. However, even the GetHostEntry may have the list of addresses that will be enough for you.