2016-12-16 18 views
0

私はAzureにService Fabricを持っており、 私はService FabricマイクロサービスのクライアントであるAzure App Service(ASP.NET MVC Webサイト)を持っています。Azure App Service上のサービスファブリッククライアント。 DLL 'FabricCommon.dll'を読み込めません

私はWebアプリケーションを実行すると、次のように表示されます。DLL 'FabricCommon.dll'を読み込めません:指定されたモジュールが見つかりませんでした。 (HRESULTからの例外:0x8007007E)

私はAzure Service Fabric missing DLL on production server: FabricCommon.dllを見てきましたが、私はここ紺碧のAppサービス

上のサービスファブリックSDKをインストールすることが可能であるかわからないが、私のクライアントです:

var factory = new CustomWcfCommunicationClientFactory<TContract>(
       CreateDefaultNetTcpBinding(), 
       endpointBehaviors: new List<IEndpointBehavior> {new StarShipEnpointBehavior(up)}, 
       endpointIdentity: EndpointIdentity.CreateDnsIdentity("MyIdentity"), 
       exceptionHandlers: new List<IExceptionHandler> {new WcfClientExceptionHandler()}, 
       servicePartitionResolver: ServicePartitionResolver.GetDefault()); 
var serviceFabricDescription = dict[typeof(TContract)]; 
return new WcfCommunicationClient<TContract>(
       factory, 
       serviceFabricDescription.Uri, 
       ServicePartitionKey.Singleton, 
       listenerName: serviceFabricDescription.ListenerName); 

「CustomWcfCommunicationClientFactoryは」「Microsoft.ServiceFabric.Services.Wcf」標準ライブラリから「WcfCommunicationClientFactory」とほぼ同じですが、私はここでの行動やアイデンティティに

を提供することを可能にすると、スタックトレースです:

[DllNotFoundException: Unable to load DLL 'FabricCommon.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)] 
    System.Fabric.Interop.NativeCommon.FabricGetConfigStore(Guid& riid, IFabricConfigStoreUpdateHandler updateHandler) +0 
    System.Fabric.Common.NativeConfigStore.CreateHelper(IFabricConfigStoreUpdateHandler updateHandler) +93 
    System.Fabric.Interop.Utility.WrapNativeSyncInvoke(Func`1 func, String functionTag, String functionArgs) +29 
    System.Fabric.Interop.Utility.RunInMTA(Func`1 func) +55 
    System.Fabric.Common.Tracing.TraceConfig.InitializeFromConfigStore(Boolean forceUpdate) +133 
    Microsoft.ServiceFabric.Services.ServiceTrace..cctor() +23 

[TypeInitializationException: The type initializer for 'Microsoft.ServiceFabric.Services.ServiceTrace' threw an exception.] 
    Microsoft.ServiceFabric.Services.Communication.Client.CommunicationClientCache`1..ctor(String traceId) +63 
    Microsoft.ServiceFabric.Services.Communication.Client.CommunicationClientFactoryBase`1..ctor(IServicePartitionResolver servicePartitionResolver, IEnumerable`1 exceptionHandlers, String traceId) +283 
    StarShip.Web.Logic.HelperService.CustomWcfCommunicationClientFactory`1..ctor(Binding clientBinding, IEnumerable`1 exceptionHandlers, IServicePartitionResolver servicePartitionResolver, String traceId, Object callback, ICollection`1 endpointBehaviors, EndpointIdentity endpointIdentity) +90 
    StarShip.Web.Logic.HelperService.WcfHelper.GetClient(ICurrentUserProvider up) +504 
    StarShip.Web.Logic.Services.<GetLocations>d__4.MoveNext() +98 
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +14139120 
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 
    StarShip.Web.Logic.Services.<CreateLoginModel>d__3.MoveNext() +260 
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +14139120 
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 
    StarShip.Web.Controllers.<Index>d__3.MoveNext() +215 
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +14139120 
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 
    System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +93 
    System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult) +22 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42 
    System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72 
    System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386 
    System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42 
    System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +30 
    System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +186 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38 
    System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29 
    System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65 
    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 
    System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36 
    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38 
    System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44 
    System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65 
    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157 

答えて

0

私の話の難しい部分は、私が外の世界のために私のService Fabricエンドポイントを公開したくないということでした。代わりにAzure Web AppをVPNを使用して直接サービスファブリッククラスタにリンクしたいと思っていました。問題は、SDKがインストールされていないサービス・ファブリック・クラスを使用できないことです。だから今私はHTTP APIを使用します。 https://github.com/lAnubisl/ServiceFabricHttpApiClient

1

クラスタ外部からのSFサービスと通信するために、あなたはWebApiまたはWCF、またはService Bus listenerのように、サービス内の通信エンドポイントを公開する必要があります。

詳細情報here

編集:

あなたのコードスニペットが利用できないサービスファブリックSDKを使用しています。代わりに、純粋なWCFコードを使用してクライアントプロキシを作成します。たとえば、既存のクライアントからコピーします。またはthisのようなメタデータエンドポイントを公開し、サービス参照を追加します。

+0

私はちょうど事をやっています – Anubis

+0

いいえ質問に落ちるコードを追加してください。 – LoekD

+0

私はstacktraceとコードスニペットを追加しました – Anubis

関連する問題