This error will come when you will call .net assembly from BizTalk orchestration using Expression shape or Message Assignment shape. The error telling you that the .Net assembly could not loaded means the .Net assembly is not exist in Globle Assembly Cache(GAC). So you have to put the particular assembly in GAC.
You can keep the assembly in GAC using the GACUtil command. Suppose you have the “Microsoft.Practices.EnterpriseLibrary.Logging” file in “C:\program Files\Microsoft Enterprise Library 3.1 – May 2007\Bin” folder. Open the microsoft Visual Studio Command Prompt. Then change the directory to this path(“C:\program Files\Microsoft Enterprise Library 3.1 – May 2007\Bin” ) and write the following command to put the assembly in GAC:GACUtil i/ Microsoft.Practices.EnterpriseLibrary.Logging.dllIts will install the Microsoft.Practices.EnterpriseLibrary.Logging.dll in GAC.Now restart your BizTalk Service Host and stop and start your BizTalk application. Then test your orchestration. It will resolve your problem.Cheers:)
can You Tell Me how can i install Gac utill
By: Aun Ali Siraj on May 27, 2008
at 1:41 pm
To install any assembly in GAC u can use the GACUtil.
1>Open the Visual Studio Command Prompt.
2>Move to the directory where your assembly(dll) is located.
3> write the following command in you Visual Studio Command Prompt.
GACUtil /i urDllName.dll
Let me know still you have any issue.
Regards,
Vijay modi
By: Vijay Modi on May 27, 2008
at 2:23 pm
The solution you gave doesn’t solve the problem. I installed the assembly in GAC but no luck. The following is the error i am getting…can you pls help me out to solve this problem.
Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘LogMethod.LogProcess(3c45ab11-3512-0116-eaff-acfd8aa40ce4)’.
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: 365f8ae8-02e9-4bca-8cdf-9441f71a45e1
Shape name: ConstructMessage_1
ShapeId: a37a764c-4a95-4453-81bf-f5681075b5ea
Exception thrown from: segment 1, progress 8
Inner exception: The type initializer for ‘Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry’ threw an exception.
Exception type: TypeInitializationException
Source: Microsoft.Practices.EnterpriseLibrary.Logging
Target Site: Void .ctor()
The following is a stack trace that identifies the location where the exception occured
at Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry..ctor()
at LoggingMethod.LogDetails.LogError(String ex)
at LogMethod.LogProcess.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:
Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
Exception type: FileNotFoundException
Source: mscorlib
Target Site: System.RuntimeMethodHandle ResolveMethod(Int32, System.RuntimeTypeHandle*, Int32, System.RuntimeTypeHandle*, Int32)
The following is a stack trace that identifies the location where the exception occured
at System.ModuleHandle.ResolveMethod(Int32 methodToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
at System.ModuleHandle.ResolveMethodHandle(Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.ModuleHandle.ResolveMethodHandle(Int32 methodToken)
at System.RuntimeType.GetMethodBase(ModuleHandle scope, Int32 typeMetadataToken)
at System.RuntimeType.GetMethodBase(Module scope, Int32 typeMetadataToken)
at System.Reflection.CustomAttributeData..ctor(Module scope, CustomAttributeRecord caRecord)
at System.Reflection.CustomAttributeData.GetCustomAttributes(Module module, Int32 tkTarget)
at System.Reflection.CustomAttributeData.GetCustomAttributes(Assembly target)
at System.Resources.ResourceManager.GetNeutralResourcesLanguage(Assembly a, UltimateResourceFallbackLocation& fallbackLocation)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter..ctor()
at Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry..cctor()
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
By: Malathi on July 15, 2008
at 11:06 am
Hi Malathi,
Please read the full error message you sent. You need to install the :
Microsoft.Practices.EnterpriseLibrary.Common
assembly too in the GAC. the logging assembly is dependent on this Microsoft.Practices.EnterpriseLibrary.Common assembly.
Please install this too. It will resolve your error.
Regards,
Vijay Modi
By: Vijay Modi on July 15, 2008
at 12:53 pm
Even i had same problem, now it got resolved.
Thanks for ur post…
By: Pavan on September 6, 2008
at 6:41 pm
Hi ,
I am using Biztalk server 2006 R2 and trying to call .net component which I have compiled using X86 platform. I have compiled .net component using X86 Platform because of the requirement of the project . Now my Orchestration is not picking the .net component even though I have all the assemblies in GAC.. I am getting following XLANG error. Please let me know if you have any idea on this.
Error :
Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘MyMQTest.OrderOrch(69bdce26-9e61-25ac-6b08-449c2c8ddd50)’.
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: 7d364507-507d-4c1b-8191-298776a9a34e
Shape name:
ShapeId:
Exception thrown from: segment -1, progress -1
Inner exception: Could not load file or assembly ‘MQClsLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a2ea9aedd6d3df19′ or one of its dependencies. The system cannot find the file specified.
Exception type: FileNotFoundException
Source: MyMQTest
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 MyMQTest.OrderOrch.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Thanks ,
DS
By: DS on September 19, 2008
at 1:01 am
Hi DS,
There problem is that the “MQClsLib” is not in GAC. Please check it. And there might be the following problem:
Exception type: FileNotFoundException
Source: MyMQTest
Target Site: Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions)
I think its not finding the File. please check it too. And then restart your host instance. Its required to restart the Host Instance in which your application is running.
Thanks,
Vijay Modi
By: Vijay Modi on September 19, 2008
at 5:43 am
Vijay,
Thanks for your Reply, I do have “MQClsLib” in GAC. I have only one version of this dll so there is no version conflict. I also tried restart Host instance on which my Biztalk application is running but still i am getting the same error.
I think the problem is when I compile “MQClsLib” using X86 Platform the file is not getting picked by biztalk application.
As I mentioned earlier I am working on Biztalk Server 2006 R2 on operating system Windows Server 2003 Standard x64 edition. I have Visual studio 2005 installed on the same box.
So When I compile my MQClsLib using x86 platform Biztalk doesn’t pick the dll . I tried creating other class library and compiled it using “Any CPU” platform and found that Biztalk picks that and execute even . But as per the requirement of my project I can not change MQClsLib to “AnyCPU”.
Please let me know if you have any idea on this problem.
Thanks in advance.
DS
By: DS on September 19, 2008
at 1:53 pm
Hi DS,
Please insert the Microsoft.XLANGs.Core.StopConditions in the GAC. And restart the Host Instance and test the application. This might be the problem on this side too.
Regards,
Vijay Modi
By: Vijay Modi on September 19, 2008
at 3:35 pm
Thanks a lot, that solved my problem.
By: Bilyana on October 30, 2008
at 12:44 am
Hi,
I had the same problem and when I look at the error message is says “Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service “. This mean that there is already a running instance of your orchestration and is in suspned mode. Now there are two ways to resolve this.
1) Go to BizTalk Admin, find the suspended instance and terminate.
2) Restart the host instance.
Regards,
Muhammad Afzal
By: Muhammad Afzal on February 2, 2009
at 2:02 am
plz
help me
************** Exception Text **************
System.IO.FileNotFoundException: File or assembly name CrystalDecisions.CrystalReports.Engine, or one of its dependencies, was not found.
File name: “CrystalDecisions.CrystalReports.Engine”
at NCE_SYSTEM.purchase.particular_report()
at NCE_SYSTEM.purchase.Button3_Click(Object sender, EventArgs e) in C:\Documents and Settings\rashid\My Documents\Visual Studio Projects\NCE SYSTEM\purchase.vb:line 1374
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
=== Pre-bind state information ===
LOG: DisplayName = CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
(Fully-specified)
LOG: Appbase = C:\Documents and Settings\rashid\My Documents\Visual Studio Projects\NCE SYSTEM\bin\
LOG: Initial PrivatePath = NULL
Calling assembly : NCE SYSTEM, Version=1.0.3371.14575, Culture=neutral, PublicKeyToken=null.
===
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
LOG: Attempting download of new URL file:///C:/Documents and Settings/rashid/My Documents/Visual Studio Projects/NCE SYSTEM/bin/CrystalDecisions.CrystalReports.Engine.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/rashid/My Documents/Visual Studio Projects/NCE SYSTEM/bin/CrystalDecisions.CrystalReports.Engine/CrystalDecisions.CrystalReports.Engine.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/rashid/My Documents/Visual Studio Projects/NCE SYSTEM/bin/CrystalDecisions.CrystalReports.Engine.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/rashid/My Documents/Visual Studio Projects/NCE SYSTEM/bin/CrystalDecisions.CrystalReports.Engine/CrystalDecisions.CrystalReports.Engine.EXE.
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
—————————————-
NCE SYSTEM
Assembly Version: 1.0.3371.14575
Win32 Version: 1.0.3371.14575
CodeBase: file:///C:/Documents%20and%20Settings/rashid/My%20Documents/Visual%20Studio%20Projects/NCE%20SYSTEM/bin/NCE%20SYSTEM.exe
—————————————-
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
—————————————-
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
—————————————-
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
—————————————-
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
—————————————-
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
—————————————-
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
By: rashid on March 25, 2009
at 11:40 am
plz
help me
vb.net 2003 platform :file or assembly name CrystalDecisions.CrystalReports.Engine, or one of its dependencies, was not found.
By: rashid on March 25, 2009
at 11:44 am