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
  • 33,416
  • 13
  • 100
  • 127
Banshee
  • 15,436
  • 37
  • 114
  • 205

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,334
  • 7
  • 99
  • 123
  • 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