Wcf BizTalk中的OperationContext.Current.OutgoingMessageProperties

Wcf BizTalk中的OperationContext.Current.OutgoingMessageProperties,wcf,biztalk,biztalk-2013,operationcontext,Wcf,Biztalk,Biztalk 2013,Operationcontext,必须将OperationContext.Current.OutgoingMessageProperties添加到传出BizTalk消息 如何在BizTalk中实现以下代码 ConcurrentPrograms_ARClient client1 = new ConcurrentPrograms_ARClient(binding, address); using (new OperationContextScope(client1.InnerChannel)) { OperationC

必须将OperationContext.Current.OutgoingMessageProperties添加到传出BizTalk消息 如何在BizTalk中实现以下代码

ConcurrentPrograms_ARClient client1 = new ConcurrentPrograms_ARClient(binding, address); 

using (new OperationContextScope(client1.InnerChannel))
{ 
    OperationContext.Current.OutgoingMessageProperties.Add("Property Name", "Property Value"); 
    client1.OPERATION(params...);
}

你可能想看看。
您可以在单独的项目中实现一个,并将其配置为发送端口中的行为,这样您就可以完全控制请求和回复消息。

感谢Pieter的建议。我创建了消息检查器并添加了如下属性。在调试期间,我可以查看属性。但在inspector之后,将调用编码器组件。但OperationContext.Current在编码器组件中为null。Message newMessage=Message.CreateMessagereader,int.MaxValue,request.Version;newMessage.Properties.CopyPropertiesrequest.Properties;我的意思是,我试图通过操作上下文访问自定义消息检查器中设置的自定义消息编码器中的属性。抱歉@rshaik,我无法进一步帮助您。消息检查器对我来说似乎是一个合乎逻辑的选择,但恐怕我自己还没有做过这件事。