是什么导致异常 HRESULT: 0xC0C01B22 尝试使用过滤器登记发送端口时?

What is causing the exception HRESULT: 0xC0C01B22 when attempting to enlist a send port with a filter?

这是一个简单的发送端口,我正在其中尝试通过提升的 属性 设置过滤器。每当我尝试征用此端口时,都会收到以下错误:

===================================

Could not update Send Port 'SendPort1' in Message Box. Exception from HRESULT: 0xC0C01B22 (Microsoft.BizTalk.ExplorerOM)

------------------------------
For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2013&ProdVer=3.10.229.0&EvtSrc=Microsoft.BizTalk.ExplorerOM.Resources&EvtID=IDS_ERR_SENDPORT_UPDATE

------------------------------
Program Location:

at Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer.SaveChangesWithTransaction(Object transactionObj)
at Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer.SaveChanges()
at Microsoft.BizTalk.Administration.SnapIn.Forms.Common.ExplorerPropertyPagesContainer.CommitChanges()
at Microsoft.BizTalk.SnapIn.Framework.Forms.PropertyPagesContainer.Store()
at Microsoft.BizTalk.SnapIn.Framework.Forms.SheetFramework.Store()

过滤器只是检查传入消息中是否存在提升的 属性。关于此异常只有 one post in MSDN forums 个:HRESULT 0xC0C01B22

知道是什么原因造成的吗?

答案在此页中:https://docs.microsoft.com/en-us/biztalk/core/promoting-properties

那里的注释是这样说的:

XSD base64Binary、duration、ENTITES、hexBinary、IDREFS、long、NMTOKENS 和 unsignedLong 的数据类型不支持升级。

事实证明,在我们的例子中,提升的 属性 是 xs:long 类型。我将元素类型更改为 xs:string 然后问题中的问题就消失了。

如果元素是不受支持的类型,那么从一开始就阻止元素提升是有意义的。但是在这些元素的促销阶段我们看不到任何警报。

希望这对某人有所帮助。