7

I have a WCF service communicating with client over TCP. Is there anyway to gather information about the current connect in a service method? For example the endpoint that the current user is using?

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
Banshee
  • 15,376
  • 38
  • 128
  • 219

1 Answers1

11

You can use the OperationContext.Current property to get all kinds of useful information about the method you are currently in.

For your specific example:

OperationContext.Current.EndpointDispatcher.EndpointAddress

Josh
  • 44,706
  • 7
  • 102
  • 124
  • 1
    Hi @Josh, can you please go through this link , http://stackoverflow.com/questions/10616995/wcf-3-5-find-the-url-the-client-used-to-get-to-the-service-server-side . can you reply it ? – KumarHarsh Jan 25 '16 at 10:17