我创建了一个actor服务,该服务在开发集群上运行。一个ASP.NET应用程序(通过IIS单独托管)连接到群集并使用参与者。这很好。
但是,当我将所有内容部署到生产环境时,ASP.NET应用程序将无法连接到群集,但以下情况除外。群集托管在本地(Windows 2012 R2)中。
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
似乎在Web服务器(托管ASP.NET)上找不到FabricCommon.dll。
我发现此文件是群集安装程序包的一部分。在开发计算机和集群计算机上,文件位于:C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\FabricCommon.dll
。但这显然不是通过客户端应用程序中的NuGet安装的依赖项。
我是否错过了在Web服务器上安装任何必备软件的机会?我是否必须手动包含DLL?
我认为您需要在Web服务器上安装Service Fabric SDK。
请参阅下面的链接:https : //azure.microsoft.com/en-us/documentation/articles/service-fabric-get-started/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句