Get current endpoint in WCF services?

I have a WCF service communicating with a client through TCP. Do I need to collect information about the current connection in the service method? For example, the endpoint that the current user is using?

+6
source share
1 answer

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

In your specific example:

OperationContext.Current.EndpointDispatcher.EndpointAddress

+7
source

Source: https://habr.com/ru/post/948778/