Determine which wcf endpoint is being used on the server

后端 未结 2 670
Happy的楠姐
Happy的楠姐 2021-02-19 08:51

I have a wcf service thats exposing a service using two endpoints. One endpoint is used for web service calls while the other is using rest.

Is there a way to determine

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-19 09:08

    Lifted from the blog entry here:

    You just need to look at the LocalAddress on the Channel of the current Operation Context in the method:

    OperationContext.Current.Channel.LocalAddress
    

提交回复
热议问题