首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >生产服务器上缺少DLL的Azure Service Fabric : FabricCommon.dll

生产服务器上缺少DLL的Azure Service Fabric : FabricCommon.dll
EN

Stack Overflow用户
提问于 2016-06-24 12:55:10
回答 5查看 7.3K关注 0票数 11

我已经创建了一个参与者服务,它运行在一个开发集群上。ASP.NET应用程序(通过IIS单独托管)连接到集群并使用参与者。这个很好用。

但是,当我将所有东西部署到生产环境中时,ASP.NET应用程序无法连接到集群,只有下面的例外情况。集群是在前提下托管的(Windows2012 R2)。

代码语言:javascript
运行
复制
The type initializer for 'Microsoft.ServiceFabric.Services.ServiceTrace' threw an exception.

Stacktrace:
   at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.TryGetConfigPackageObject(String configPackageName, ConfigurationPackage& package)
   at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.GetSettingsFilePath(String configPackageName)
   at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.GetConfig()
   at Microsoft.ServiceFabric.Services.Common.FabricServiceConfigSection.Initialize()
   at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.LoadFrom(String sectionName, String filepath, String configPackageName)
   at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.TryLoadFrom(String sectionName, FabricTransportSettings& settings, String filepath, String configPackageName)
   at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.GetDefault(String sectionName)
   at Microsoft.ServiceFabric.Actors.Remoting.FabricTransport.FabricTransportActorRemotingProviderAttribute.CreateServiceRemotingClientFactory(IServiceRemotingCallbackClient callbackClient)
   at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.CreateServiceRemotingClientFactory(Type actorInterfaceType)
   at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.GetOrCreateServiceRemotingClientFactory(Type actorInterfaceType)
   at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.CreateActorProxy[TActorInterface](Uri serviceUri, ActorId actorId, String listenerName)
   at Microsoft.ServiceFabric.Actors.Client.ActorProxy.Create[TActorInterface](ActorId actorId, Uri serviceUri, String listenerName)

Inner Exception:
innerExceptionType: System.DllNotFoundException
innerStacktrace:
   at System.Fabric.Interop.NativeCommon.FabricGetConfigStore(Guid& riid, IFabricConfigStoreUpdateHandler updateHandler)
   at System.Fabric.Common.NativeConfigStore.CreateHelper(IFabricConfigStoreUpdateHandler updateHandler)
   at System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag, String functionArgs)
   at System.Fabric.Interop.Utility.RunInMTA[TResult](Func`1 func)
   at Microsoft.ServiceFabric.Common.Tracing.Trace.InitializeFromConfigStore()
   at Microsoft.ServiceFabric.Services.ServiceTrace..cctor()
innerExceptionMessage: Unable to load DLL 'FabricCommon.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
exceptionType: System.TypeInitializationException

FabricCommon.dll似乎无法在web服务器(承载ASP.NET)上找到。

我发现这个文件是集群安装包的一部分。在开发机器和集群机器上,文件位于以下位置:C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\FabricCommon.dll。但它显然不是通过客户端应用程序中的NuGet安装的依赖项。

我是否错过了在web服务器上安装任何先决条件?是否必须手动包含DLL?

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2016-06-24 16:52:38

我认为您需要在web服务器上安装。

参见下面的链接:https://azure.microsoft.com/en-us/documentation/articles/service-fabric-get-started/

票数 5
EN

Stack Overflow用户

发布于 2016-06-24 19:17:53

将以下Service bin路径添加到path环境变量:

代码语言:javascript
运行
复制
set PATH=%PATH%;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code 

还将执行策略设置为无限制的:

代码语言:javascript
运行
复制
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser 
票数 10
EN

Stack Overflow用户

发布于 2016-06-24 18:05:27

在我的开发机器中,有一次会发生这种情况。我所做的就是重新安装。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38013972

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档