Export Biztalk Dynamic Send Port Handler Name

468 views Asked by At

When I export binding for Dynamic Send Port Then no handler name is shown in the binding file. So is there any alternate method for that.

2

There are 2 answers

1
Dijkgraaf On BEST ANSWER

One suggestion by Stephen F March was to use a PowerShell script to set these.

From 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 also just posted a blog about it called BizTalk DevOps: How to configure Default Dynamic Send Port Handlers with PowerShell

0
Dheer On

BizTalk 2013 no out of Box you need to use powershell as listed above.

For BizTalk 2016 + CU8 ( and above only) u will be able to get the Host details in the Binding File when u export .

For BizTalk 2020 use CU2 , CU1 has an issue with this