2016-11-28 29 views
1

Azureにaspnetコアアプリケーションをデプロイしようとしています。私は次のエラーを提示していますアプリを起動しようとすると、これがOKを経ているようだけど...Aspnet Core AzureがHTTPエラー502.5で失敗する - プロセスエラー

この問題の一般的な原因:

アプリケーションプロセスは アプリケーション・プロセスの起動に失敗しました。始めたが、その後、アプリケーション・プロセスが開始 を停止しますが、設定されたポート上で

トラブルシューティングの手順を聞くことができなかった:

アプリケーションプロセスのログを有効に エラーメッセージは、システムイベントログを確認しますAzureのログには何も示されていません。

マイクロソフトのドキュメントが私にこの情報を与える...

Platform conflicts with RID

Browser: HTTP Error 502.5 - Process Failure

Application Log: - Application Error: Faulting module: KERNELBASE.dll Exception code: 0xe0434352 Faulting module path: C:\WINDOWS\system32\KERNELBASE.dll - IIS AspNetCore Module: Failed to start process with commandline '"dotnet" .\my_application.dll' (portable app) or '"PATH\my_application.exe"' (self-contained app), ErrorCode = '0x80004005'.

ASP.NET Core Module Log: Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'teststandalone.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Troubleshooting:

If you published a self-contained application, confirm that you didn't set a platform in buildOptions of project.json that conflicts with the publishing RID. For example, do not specify a platform of x86 and publish with an RID of win81-x64 (dotnet publish -c Release -r win81-x64). The project will publish without warning or error but fail with the above logged exceptions on the server.

...しかし、実際には、これらの設定は、Azureのためにどうあるべきかを私に言うことによって助けていない(それが関連するかどうか)ので、私は」これが赤ちゃんかどうかわからない。私は、私のドットネット公開構成で-rスイッチを指定していません。より多くの調査私は%LAUNCHER_PATH%および%LAUNCHER_ARGS%自分自身を値に変更するために必要なことを発見した後

は私がログインを繰り返し、いくつかのXMLを投げたイベントログ...

Failed to start process with commandline '"%LAUNCHER_PATH%" %LAUNCHER_ARGS%', ErrorCode = '0x80070002'.

を見つけることができました。私はweb.configにさまざまな変更を試みましたが、運はありません。私のweb.configファイルは次のようになります...

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 

    <!-- 
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380 
    --> 

    <system.webServer> 
    <handlers> 
     <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> 
    </handlers> 
    <aspNetCore processPath="dotnet" arguments="site\wwwroot\Esoterix.Modle.Portalweb.dll" stdoutLogEnabled="true" stdoutLogFile="LogFiles\stdout" forwardWindowsAuthToken="false"/> 
    </system.webServer> 
</configuration> 

パスが標準出力ログファイルのパスのために働くようだAzureの展開のルートからです(私はそれで報告されたエラーを得ていた)ではないためアプリケーション自体。私がしようとした場合、私はまだ... ..

Failed to load the dll from [\?\D:\home\site\wwwroot\hostpolicy.dll], HRESULT: 0x800700C1

An error occurred while loading required library hostpolicy.dll from [\?\D:\home\site\wwwroot]

私は私の標準出力を見ると、私は次のものが4回

を繰り返して

<Event> 
    <System> 
     <Provider Name="IIS AspNetCore Module"/> 
     <EventID>1000</EventID> 
     <Level>0</Level> 
     <Task>0</Task> 
     <Keywords>Keywords</Keywords> 
     <TimeCreated SystemTime="2016-11-28T19:31:32Z"/> 
     <EventRecordID>1514022203</EventRecordID> 
     <Channel>Application</Channel> 
     <Computer>RD0004FFD7108D</Computer> 
     <Security/> 
    </System> 
    <EventData> 
     <Data>Failed to start process with commandline '"dotnet" site\wwwroot\Esoterix.Modle.Portalweb.dll', ErrorCode = '0x80004005'.</Data> 
    </EventData> 
</Event> 

を次のエラーを見ていますここのWeb設定で直接EXEを実行しています...

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 

    <!-- 
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380 
    --> 

    <system.webServer> 
    <handlers> 
     <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> 
    </handlers> 
    <aspNetCore processPath="\\?\%home%\site\wwwroot\Esoterix.Modle.Portalweb.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false"/> 
    </system.webServer> 
</configuration> 

次に私の標準出力は私に次のエラーを与えます...

Failed to load the dll from [\?\D:\home\site\wwwroot\hostfxr.dll], HRESULT: 0x80070057

The library hostfxr.dll was found, but loading it from \?\D:\home\site\wwwroot\hostfxr.dll failed

答えて

1

dotnet-publish-iisへの参照を追加して解決しました。これを行う方法の

完全な詳細は、洞察力のためのhttps://github.com/aspnet/Hosting/issues/892

+0

おかげで仲間にgithubの問題に記録されます! –

関連する問題