通过BizTalk编排调用.Net类时出错

发布于 2024-10-21 12:15:27 字数 2648 浏览 5 评论 0原文

我尝试通过 BizTalk 编排调用 .net 类。但是当我将消息发送到 BizTalk 时,它并没有真正调用该类,而是出现以下错误。

有人可以帮忙吗?

xlang/s 引擎事件日志条目:创建 BizTalk_Server_test.BizTalk_Orchestration_1 服务时失败。异常类型:ServiceCreationException 下面是一个堆栈跟踪,标识 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._serviceCreator(Guid& instanceId, Object objCurrMsg) 处 Microsoft.XLANGs.Core.ResourceContainer._allocateResource(Guid&) 处发生异常的位置; 密钥、UInt32 hashKey、ResourceCreator resCreator、对象creationContext)在 Microsoft.XLANGs.Core.ResourceContainer.Dispense(Guid& key、ResourceCreator resCreator、对象creationContext)在 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._dispenseService(Guid& instanceId) IBTMessage currMsg) 在 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean&loggingError, Guid&instanceId, IBTMessage currMsg) 在 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid&instanceId, Guid&ser​​viceId, IBTMessage currentMsg) )在 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] 消息,Int32 firstIdx,Int32 计数)在 Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(对象 objMsg) 在 Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs) 其他错误信息:无法加载文件或程序集“BizTalk Server 测试,版本 = 1.0.0.0, Culture=neutral, PublicKeyToken=56064b11c189a7aa' 或其依赖项之一。系统找不到指定的文件。异常类型:FileNotFoundException 源:mscorlib 目标站点:Void GetTypeByName(System.String, Boolean, Boolean, Boolean, System.Runtime.CompilerServices.StackCrawlMarkHandle, Boolean, System.Runtime.CompilerServices.ObjectHandleOnStack) 以下是标识System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, BooleanignoreCase, BooleanreflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) 发生异常的位置 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, BooleanignoreCase, Boolean Microsoft.BizTalk 的 System.RuntimeType.GetType(String typeName, Boolean throwOnError, BooleanignoreCase, Boolean ReflectionOnly, StackCrawlMark& stackMark) 处的 System.Type.GetType(String typeName, Boolean throwOnError) 处的 ReflectionOnly、StackCrawlMark& stackMark、Boolean loadTypeFromPartialName)。 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createNewService(Guid&) 处的 XLANGs.BTXEngine.BTXServiceStaticState.Resolve() serviceId、Guid& instanceId、BTXServiceStaticState staticState) 在 Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrReHydrateRealService(Guid& instanceId、IBTMessage currMsg)

I tried to call a .net class through BizTalk orchestration. But when I send the message to the BizTalk, it not really call the class instead got the following error.

Can anyone help ?

xlang/s engine event log entry: Failed while creating a BizTalk_Server_test.BizTalk_Orchestration_1 service. Exception type: ServiceCreationException The following is a stack trace that identifies the location where the exception occured at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._serviceCreator(Guid& instanceId, Object objCurrMsg) at Microsoft.XLANGs.Core.ResourceContainer._allocateResource(Guid& key, UInt32 hashKey, ResourceCreator resCreator, Object creationContext) at Microsoft.XLANGs.Core.ResourceContainer.Dispense(Guid& key, ResourceCreator resCreator, Object creationContext) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._dispenseService(Guid& instanceId, IBTMessage currMsg) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean& loggedError, Guid& instanceId, IBTMessage currMsg) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid& instanceId, Guid& serviceId, IBTMessage currentMsg) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] messages, Int32 firstIdx, Int32 count) at Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object objMsg) at Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs) Additional error information: Could not load file or assembly 'BizTalk Server test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=56064b11c189a7aa' or one of its dependencies. The system cannot find the file specified. Exception type: FileNotFoundException Source: mscorlib Target Site: Void GetTypeByName(System.String, Boolean, Boolean, Boolean, System.Runtime.CompilerServices.StackCrawlMarkHandle, Boolean, System.Runtime.CompilerServices.ObjectHandleOnStack) The following is a stack trace that identifies the location where the exception occured at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.Resolve() at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createNewService(Guid& serviceId, Guid& instanceId, BTXServiceStaticState staticState) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满地尘埃落定 2024-10-28 12:15:27

正如消息所述:您的程序集“BizTalk Server test,Version=1.0.0.0”或其依赖项之一似乎不存在于 BizTalk 正在查找的任何参考文件夹中。您是否调查过所需的组件是否已正确部署?

As the message says: it appears that your assembly 'BizTalk Server test, Version=1.0.0.0' or one of its dependencies where not present in any of the reference folders in which BizTalk was looking. Have you investigated whether the required assembly has been properly deployed?

懵少女 2024-10-28 12:15:27

您的 .Net 代码需要位于 GAC(全局程序集缓存)中,以便 BizTalk 的底层 .Net 运行时可以解析完全限定的类型名。

根据 BizTalk 的版本(2010 与更早版本)和当前体系结构(32 位与 64 位),您可以将一个相当简单的构建后任务添加到 Visual Studio 项目中,以自动为您执行此操作。 这是我的一篇文章不久前写过

Your .Net code needs to be in the GAC (Global Assembly Cache) so the fully qualified typename can be resolved by BizTalk's underlying .Net runtime.

Depending on the version of BizTalk (2010 vs earlier) and your current architecture (32-bit vs 64-bit), there is a fairly simple post-build task you can add to your Visual Studio project to automatically do this for you. Here's a post I wrote a while ago.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文