2016-05-24 13 views
3

最終的にService Fabricにアップロードされた.NET Core RC2 Webアプリケーションを取得できました。Service Fabricで.NET Core RC2 Webアプリケーションをデバッグするときのエラーメッセージ

Error message Service Fabric

:私は、Webアプリケーション用のパーティションで次のエラーを取得するサービス・ファブリックエクスプローラで

Error message

:しかし、私はVisual Studioで、次のエラーメッセージが表示されます配備されるや否や

私ServiceManifest.xmlは、次のようになります。

<?xml version="1.0" encoding="utf-8"?> 
<ServiceManifest Name="WebApplicationPkg" 
      Version="1.0.0" 
      xmlns="http://schemas.microsoft.com/2011/01/fabric" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <ServiceTypes> 
    <StatelessServiceType ServiceTypeName="WebApplicationType" /> 
    </ServiceTypes> 

    <CodePackage Name="Code" Version="1.0.0"> 
    <EntryPoint> 
     <ExeHost> 
     <Program>WebApplication.exe</Program> 
     </ExeHost> 
    </EntryPoint> 
    </CodePackage> 
    <ConfigPackage Name="Config" Version="1.0.0" /> 

    <Resources> 
    <Endpoints> 
     <Endpoint Name="ServiceEndpoint" /> 
    </Endpoints> 
    </Resources> 
</ServiceManifest> 

そして、私のproj ect.json:

{ 
    "dependencies": { 
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview1-final", 
     "type": "build" 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Logging": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", 
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-final", 
    "NETStandard.Library": "1.5.0-rc2-24027" 
    }, 

    "tools": { 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview1-final", 
     "imports": "portable-net45+win8+dnxcore50" 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": { 
     "version": "1.0.0-preview1-final", 
     "imports": "portable-net45+win8+dnxcore50" 
    } 
    }, 

    "frameworks": { 
    "netcoreapp1.0": { 
     "imports": [ 
     "dotnet5.6", 
     "dnxcore50", 
     "portable-net45+win8" 
     ] 
    } 
    }, 

    "runtimes": { 
    "win10-x64": { } 
    }, 

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "runtimeOptions": { 
    "gcServer": true 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "Views", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ], 
    } 
} 

マイProgam.cs:

public class Program 
{ 
    public static void Main(string[] args) 
    { 
     var host = new WebHostBuilder() 
      .UseKestrel() 
      .UseStartup<Startup>() 
      .Build(); 

     host.Run(); 
    } 
} 

誰もが私が間違っていたかを見ることができますか?このエラーはどこから来ていますか? アプリケーションをローカルで実行すると問題ありません。サービスファブリックに展開するとすぐに、これらのエラーが発生します。

ありがとうございます!

答えて

1

私は同じような問題が先に起こります。私はまだ特定の問題を見つけることはできません。サービスがサービスファブリックランタイムに登録されず、特定のサービスの正常なパーティション数が指定された値(アプリケーションマニフェストのInstanceCount)未満になっているためです。

SDKで提供されているOwinCommunicationListenerに基づいて通信リスナーを作成して解決しました。私の実装は、Hosting repo by weidazhao (David)にあるものと非常によく似ています。私はそれが正式なSDKにあるものに十分近いと思われるので、それをお勧めします。

関連する問題