Q:

WCF: how to know if some request goes from localhost

Simple question:
How to know if some request/call goes from localhost in the code below?
Is it possible in fact?
Thanks!!
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)]
public class Service2 : IService2
{
        public void DoWork()
        {
           // Is this the localhost ?
        }
}

A:

you can find the ip address of request coming computer by using 
HttpContext.Current.Request.UserHostAddress

or there are few other alternatives as well (Obtaining client IP address in WCF 3.0)
based on ip address you can decide request/call goes from localhost  or not.
If you need to debug web service you can run client and service at ones and put break point on service method.

