当IsOneWay = true时context.RequestContext为null

时间:2019-02-01 16:26:01

标签: c# web-services wcf isoneway

我在C#中有WCF服务。它们都实现相同的界面

[ServiceContractAttribute(Namespace = "***", ConfigurationName = "service.IService")]
    public interface IService
    {
        [OperationContractAttribute(IsOneWay =true, Action = "***")]
        void Send(Send request);
    }

我必须从客户端请求的标头中获取数据。

我尝试使用context.RequestContext但这是null,也使用context.IncomingMessageHeaders,但是我找不到我需要的信息。

context.RequestContext=null

当IsOneWay = true时,有人知道如何从客户端的请求标头中获取信息吗?

0 个答案:

没有答案