vrijdag 8 juni 2012

BizTalk360 and DTC


At one of our customers I have set up BizTalk360 as their BizTalk monitoring environment.
All in all, they are very happy with it, but we ran into one problem.
When they tried to suspend or resume an instance, they would get the following error:
Unable to enlist in the transaction.
System.Runtime.InteropServices.COMException (0x8004D00A): Unable to enlist in the transaction.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)
at System.Management.ManagementObject.InvokeMethod(String methodName, Object[] args)
at A.cf0555bb9c0f6a0aebd67da53b41e6535.cc49ef4e8476b31546c8cfd644bd22a66(String c3ce089d4844970dd178d4bf819010021)
at Kovai.BizTalk360.BusinessService.Main.BizTalkQueryBusinessService.ExecuteServiceInstanceOperation(ServiceInstances serviceInstances, ServiceInstanceOperation operation)
at Kovai.BizTalk360.WCFService.BizTalkQueryService.ExecuteServiceInstanceOperation(BizTalkQueryServiceRequest request, ServiceInstances serviceInstances, ServiceInstanceOperation operation)

After some research, I found out this was a problem with the DTC service, which was not enabled on the BizTalk360 machine.
To solve it, follow these steps (on Windows Server 2008 R2).

First open  the Component Services snap-in by giving the command dcomcnfg in the start menu.
In the tree, open Component Services, Computers, My Computer, Distributed Transaction Coordinator, and finally right-click on Local DTC and select properties.
Go to the Security tab, enable Network DTC Access, Allow Inbound and Allow Outbound, and click OK.
Now restart your BizTalk360 service, and things should be working.

vrijdag 1 juni 2012

BizTalk Powershell Provider on Windows Server 2008 R2

Today I ran into a problem while trying to use the BizTalk PowerShell Provider on a Windows Server R2 installation.

I allready knew I would have to use the 32 bit version when working with the provider, however on starting up the console I received the following message:

Add-PSSnapin : Cannot load Windows PowerShell snap-in BizTalkFactory.Powershell.Extensions because of the following err or: Could not load file or assembly 'file:///C:\Program Files (x86)\BizTalkFactory PowerShell Provider\BizTalkFactory.P owerShell.Extensions.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently load ed runtime and cannot be loaded. At C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1:5 char:13 + Add-PSSnapin <<<< BizTalkFactory.Powershell.Extensions + CategoryInfo : InvalidArgument: (BizTalkFactory.Powershell.Extensions:String) [Add-PSSnapin], PSSnapInE xception + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

In the documentation for the provider it states it targets .NET 2.0, and that the configuration files should be changed to the following:

 

<configuration>

  <startup>

    <supportedRuntime version="v4.0.30319" />

  </startup>

</configuration>

 

This did however not solve my problem.

After further investigation I found out you actually need following in the configuration file:

 

<configuration>

  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0.30319" />

    <supportedRuntime version="v2.0.50727" />

  </startup>

</configuration>