2016-11-28 4 views
1

Ich versuche, eine Aspnet-Core-App auf Azure bereitzustellen. Dies scheint durch OK gegangen zu sein, aber wenn ich versuche, um die App zu starten ich mit dem folgenden Fehler präsentierte am ...Aspnet Core Azure fehlgeschlagen mit HTTP-Fehler 502.5 - Prozessfehler

Häufige Ursachen für dieses Problem:

Der Bewerbungsprozess fehlgeschlagen Der Bewerbungsprozess starten begonnen, aber dann gestoppt Prozess die Anwendung gestartet aber nicht auf dem konfigurierten Port Schritte

Fehlerbehebung hören:

das Systemereignisprotokoll prüfen Fehlermeldungen Aktivieren Sie den Bewerbungsprozess Anmeldung Die Azure-Protokolle zeigen nichts an.

Die Microsoft-Dokumentation geben Sie mir diese Info ...

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.

... aber helfen nicht wirklich von mir zu sagen, was diese Einstellungen für Azure sein sollte (oder wenn es dort relevant ist), so I‘ Ich bin mir nicht sicher, ob das ein Hering ist. Ich gebe kein -r an, um meine dotnet-Veröffentlichungskonfiguration zu aktivieren.

ich es geschafft, ein Ereignisprotokoll zu finden, die Protokollierung einige XML warf immer wieder ...

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

Nach mehr Untersuchung entdeckte ich, dass ich die% LAUNCHER_PATH% und% LAUNCHER_ARGS% Werte selbst ändern musste. Ich habe verschiedene Änderungen an der web.config ausprobiert, aber kein Glück. Mein web.config sieht nun wie folgt ...

<?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> 

Die Wege sind aus der Wurzel der Azure-Bereitstellung, die für den stdout Protokolldateipfad scheint zu funktionieren (ich war Fehler immer mit, dass berichtet), aber nicht für die App selbst Ich sehe immer noch die folgende Fehlermeldung ..

<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> 

Welche 4-mal wiederholt wird

Wenn ich in meinem stdout Ausgabe sehe ich habe folgendes ...

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]

Wenn ich versuche, die exe direkt mit dem Web-Config läuft hier ...

<?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> 

Dann gibt meinen stdout mir die folgende Störung ...

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

Antwort

1

Ich löste dies, indem ich einen Verweis auf dotnet-publish-iis hinzufüge.

Ausführliche Informationen darüber, wie dies zu tun bei https://github.com/aspnet/Hosting/issues/892

+0

Dank Kumpel für die Erkenntnisse in einer Github Ausgabe angemeldet! –

Verwandte Themen