How to find out whether current method is flagged with IsOneWay
问题 Is there a way to know whether the currently executing WCF method is a OneWay method? I'm using httpBinding and the question relates to the server side. I searched in properties for OperationContext on MSDN and couldn't find it. EDIT : I used the following check: HttpContext.Current.Response.StatusCode != (int)System.Net.HttpStatusCode.Accepted; In case of OneWay calls the status code will be 202, but it's not a good way. Are there any better ways? 回答1: The WCF way to solve this is to: Create