Take the 2-minute tour ×


I have a WCF service hosted in IIS7 that uses WAS to communicate over TCP. At the service side I have implemented the IParameterInspector to log service operations that is called but I also need the client IP/Name.

I have tried this :


But that will always return "::1" ? If I use :


The name will always be local and this is even when the client is on a diffrent computer then the service?


Edit 1: The IP is not possible to get if I have read right so then the question is if there is any other way to specifie a client, maby some kind of GUID or is it only session ID I should use?

share|improve this question
You appear to have written code made to get the local address via a convoluted way. –  Andrew Barber Mar 30 '12 at 8:50
Yes it seems so, the question is how I get the client IP? Is it possible? –  Banshee Mar 30 '12 at 11:28
add comment

1 Answer

You may receive an IPv6 address (as you have here). ::1 is the IPv6 equivalent to on IPv4.

In addition, not all IP addresses have a host name associated with them, and some may not have any periods (eg if you get 'localhost' or another local LAN machine name)

share|improve this answer
I could probably live with only the IP(IPV4) adress of the client but Im sure that the remote client is not located on my local computer where I have the service. So how do I find out the client IP/Domain Name in the IParameterInspector? –  Banshee Mar 30 '12 at 7:28
add comment

Your Answer


