当我导出动态发送端口的绑定时,绑定文件中不显示处理程序名称。那么有没有替代方法。
答案 0 :(得分:2)
Stephen F March的一个建议是使用PowerShell脚本来设置它们。
来自How to configure Send Handler for BizTalk 2013 Dynamic Send Port on deployment?
param
(
[string] $bizTalkDbServer = ".",
[string] $bizTalkDbName = "BizTalkMgmtDb",
[string] $fileHostInstance = "SendingHost",
[string] $sendPortName = "sm_dynamic_sp_test"
)
[System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM") | Out-Null
$catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$catalog.ConnectionString = "SERVER=$bizTalkDbServer;DATABASE=$bizTalkDbName;Integrated Security=SSPI"
foreach($sp in $catalog.SendPorts)
{
if($sp.Name -eq $sendPortName)
{
"Found send port $($sp.Name), analyzing send handler"
foreach($sh in $sp.DynamicSendHandlers)
{
if($sh.SendHandler.TransportType.Name -eq "FILE")
{
if($sh.SendHandler.Host.Name -ne $fileHostInstance)
{
"Changing $($sh.Name) send handler to '$fileHostInstance' from '$($sh.SendHandler.Host.Name)'"
$sp.SetSendHandler("FILE", $fileHostInstance)
}
else
{
"Send handler for $($sp.Name) is already '$fileHostInstance' ignorning .. "
}
}
}
}
}
$catalog.SaveChanges()
Sandro Pereira刚刚发布了一个名为BizTalk DevOps: How to configure Default Dynamic Send Port Handlers with PowerShell
的博客