Last post Mar 31, 2014 05:07 AM by mou_inn
Jan 31, 2014 09:30 AM|mou_inn|LINK
we can develop a single wcf service but may have multiple binding for that service....for example one binding would be basichttp and wsHttp, tcp-ip etc. many client may use different endpoint. so when request come to wcf service then how can we detect the
request comes from which binding?
guide me how to capture the request binding details from service function call. thanks
Feb 06, 2014 02:37 AM|Ilikeit|LINK
check reply in:
Feb 07, 2014 01:56 AM|mou_inn|LINK
i guess u r kind of googler not developer. here i post my query to attend by developer. if u do not know the answer.........then just back off from my question. i hate this kind of people who give link and only empty vessel post the link.
Mar 31, 2014 05:07 AM|mou_inn|LINK
I got the answer
Why exactly do you care about this? Your service really shouldn't care, overall, which binding the client used to get to the service if that is going to affect the service behavior (in that case, it might really make more sense to have multiple separate
That said, I think one possible way would be to look at the endpoint address for the service, which I think you can get using something like this (untested):
var opCtxt = OperationContext.Current;
var epAddress = opCtxt.EndpointDispatcher.EndpointAddress;
var uri = epAddress.Uri;