Microsoft.biztalk.explorerom.btsca talogexplorer.savechanges() Exception:Could not enlist orchestration

Hi All,

We have BizTalk2010(with SQL remote). When I am trying to Start BizTalk Application using below PowerShell I am getting below error.

Exception calling "SaveChanges" with "0" argument(s): "Could not enlist orchestration"

Exception has been thrown by the target of an invocation.Client requested abort.Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

PowerShell Script:

function StartBTSApplication
{
 param([string]$applicationName)
 trap { Write-Output "Error" }
 $exp = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
    
 $exp.ConnectionString = "server=NTFWSQLD2\DEV1;database=BizTalkMgmtDb;Integrated Security=SSPI"
    $exp.ConnectionString = $btsConnectionString
 $app = $exp.Applications[$applicationName]
 if($app -eq $null)
 {
  Write-Output "Application $applicationName not found"
 }
 else
 {
  if($app.Status -ne 1)
  {  
   #full start of application
   $null = $app.Start(63)
   $null = $exp.SaveChanges() # SaveChanges method not able to commit the changes on BT databases
   Write-Output "Started application: $applicationName"
  }

Few Observations:

1). Getting this error only for newly insatlled application, If any application was at least one time started mannually on BT console, I am able to start it again using the same script (Using PowerShell console 32 bit and PowerShell ISE).

2). Able to start newly installed application as well, if I run this script with PowerGUI script editor tool.

3). I have refered the below link and added the Powershell.exe.config file but still no luck.

http://psbiztalk.codeplex.com/discussions/252593

Please let me know if i am doing any thing wrong.

Regards,
Satendra Bhadouria



October 24th, 2012 3:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics