Error when calling a static method from the orchestration RRS feed

  • Question

  • Hi,

    I'm trying to call  method in c#. It's a static method and I'm getting the following error:    

    Here's how I'm calling the methods.  Please advise. Thanks

    varGetTotalCount = FE.BizTalk.Common.GlobalCounter.getCountValue();

    C# Class

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace FE.BizTalk.Common
        public static class GlobalCounter
            public static int messageCount = 0;

            public  static void incrementCountValue()

            public static int getCountValue()
                return messageCount;



    <Data>xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'FESampleProduct.FESampleProductOrchestration(246924f1-1940-f89f-4404-5ff645c2908d)'. 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: 5ef83be0-bfbb-49f6-bff0-880e267b4f30 Shape name: ShapeId: Exception thrown from: segment -1, progress -1 Inner exception: Could not load type 'FE.BizTalk.Common.GlobalCounter' from assembly 'FE.BizTalk.Common, Version=, Culture=neutral, PublicKeyToken=5237b407d8f7e69a'. Exception type: TypeLoadException Source: FESampleProduct Target Site: Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions) The following is a stack trace that identifies the location where the exception occured at FESampleProduct.FESampleProductOrchestration.segment1(StopConditions stopOn) at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)</Data> 

    Thursday, March 9, 2017 9:37 PM


  • Hi BizTalk 2016 Newbie,

    Make sure you sign the C# assembly file with key file and GAC the assembly.

    Then you re-start the host instance and it should work.


    Thursday, March 9, 2017 9:43 PM