Using 64bit Host Instance

When testing an orchestration today, I ran into the following error:

xlang/s engine event log entry: Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘CRMTest.Orchestrations.GetAccountName(2b505d60-0c8f-4ebf-0280-f35d2da71685)’.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 5dd0d288-f280-446b-8362-c34b3e6cc38f
Shape name: Rcv_accountNameRequest
ShapeId: cfd98de6-2bcf-43e0-85d4-c8d6596aba74
Exception thrown from: segment 1, progress 3
Inner exception: Exception has been thrown by the target of an invocation.

Exception type: TargetInvocationException
Source: mscorlib
Target Site: System.Object _InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
The following is a stack trace that identifies the location where the exception occured

at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.XLANGs.RuntimeTypes.PartMetadata..ctor(Type t)
at Microsoft.XLANGs.RuntimeTypes.PartMetadata._creator(Type t)
at Microsoft.XLANGs.RuntimeTypes.MetadataCache._slowFor(Type t)
at Microsoft.XLANGs.RuntimeTypes.MetadataCache.For(Type t)
at Microsoft.XLANGs.RuntimeTypes.MessageMetadata..ctor(Type t)
at Microsoft.XLANGs.RuntimeTypes.MessageMetadata._creator(Type t)
at Microsoft.XLANGs.RuntimeTypes.MetadataCache._slowFor(Type t)
at Microsoft.XLANGs.RuntimeTypes.MetadataCache.For(Type t)
at Microsoft.XLANGs.RuntimeTypes.MessageMetadata.For(Type t)
at Microsoft.XLANGs.Core.XMessage.FetchProperties()
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.ReceiveMessage(Int32 iOperation, Envelope env, XLANGMessage msg, Correlation[] initCorrelations, Context cxt, Segment s)
at CRMTest.Orchestrations.GetAccountName.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:

The type initializer for ‘CRMTest.Orchestrations.__CRMTest_Schemas_AccountNameRequest_XML__’ threw an exception.

Exception type: TypeInitializationException
Source: CRMTest.Orchestrations
Target Site: Microsoft.XLANGs.BaseTypes.SchemaBase get_PartSchema()
The following is a stack trace that identifies the location where the exception occured

at CRMTest.Orchestrations.__CRMTest_Schemas_AccountNameRequest_XML__.get_PartSchema()
Additional error information:

Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

Exception type: FileLoadException
Source: CRMTest.Orchestrations
Target Site: Void .cctor()
The following is a stack trace that identifies the location where the exception occured

at CRMTest.Orchestrations.__CRMTest_Schemas_AccountNameRequest_XML__..cctor()

After some research I found out that the Loading this assembly would produce a different grant set from other instances part normally represents a failure with 32bit vs 64bit. I then checked the host-instance, and to my surprise the default value for the host-instance was 32bit only, even though the server was 64bit. So I created a new host-instance that was 64bit, changed the orchestration to use this host instance, and with that the issue was resolved.

Leave a Reply

Your email address will not be published. Required fields are marked *