BizTalk WCF自定义行为扩展未显示



我进行了以下行为扩展:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
using System.ServiceModel.Discovery;
namespace Residence.WCFEndpointBehavior
{
namespace Residence.WCFEndpointBehavior
{
public class MustUnderstandValidationOffElement : BehaviorExtensionElement
{
protected override object CreateBehavior()
{
return new MustUnderstandBehavior(false);
}
public override Type BehaviorType
{
get
{
return typeof(MustUnderstandBehavior);
}
}
}
}
}

生成的程序集名称为MustUnderstandValidationOffElement。

版本为1.1.0.0

我把总成放在GAC里。

GacUtil /lr MustUnderstandValidationOffElement

返回

MustUnderstandValidationOffElement,版本=1.1.0.0,区域性=中性,PublicKeyToken=5f1263db97cf42d0,processorArchitecture=MSIL

在BizTalk 2013 R2中,我打开相关主机名的WCF自定义适配器并导入:

<configuration>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="mustUnderstandValidationOffElement" type="Residence.WCFEndpointBehavior.MustUnderstandValidationOffElement, MustUnderstandValidationOffElement, Version=1.1.0.0, Culture=neutral, PublicKeyToken=5f1263db97cf42d0"/>
</behaviorExtensions>
</extensions>
</system.serviceModel>
</configuration>

WCF自定义传输属性中。

接下来,我重新启动主机的主机实例。

我关闭BizTalk Server管理控制台,然后再次打开它。

接下来,我使用主机中的WCF自定义适配器打开SendPort的属性->单击"配置",然后选择"绑定"。右键单击EndpointBehavior并选择Add extension。

唉——我的"mustUnderstandValidationOffElement";没有显示在列表中。

非常感谢您的帮助!

感谢Dijkgraaf指导我找到解决方案。在为我的端点行为创建了一个新的特定强名称密钥后,它出现在添加扩展列表中!

它在没有配置机器的情况下工作。config的

但是将此行为添加到发送端口并不能阻止将mustUnderstand=1发送到远程服务器。相反,它似乎使我们的Biztalk服务器忽略了任何mustUnderstand=1,即与我们所需要的完全相反。

最新更新