Reputation: 15837
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?
Upvotes: 7
Views: 9082
Reputation: 44916
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
Upvotes: 11