I'm using the publishing wizard in VS 2019, for .Net Core 3.1. Web Deploy opens a browser after deployment. A blank page hangs for a couple of minutes and then halts with the error: "HTTP Error 503. The service is unavailable."
Toggling the bitness 32/64 in App services > Configuratoin > General Setting doesn't fix it. Adding the following to .csproj doesn't seem to help either:
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
Seems nothing useful in eventLog.xml (kudu console). There's always an event in that file but the event-info isn't clear (doesn't even say 'error'), something like this (abridged).
<System>
<Provider Name="W3SVC-WP"/>
<EventID>2282</EventID>
</System>
<EventData>
<Data>D:\home\SiteExtensions\AspNetCoreRuntime.3.1.x86\ancm\aspnetcorev2.dll</Data>
<Data>AMD64</Data>
<Binary>C1000000</Binary>
</EventData>
I did install all the site extensions in App Services but I suspect those are for FDD deployments instead of self-contained.
My web.config taken from kudu console:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- To customize the asp.net core module uncomment and edit the following section.
For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
<system.webServer>
<handlers>
<remove name="aspNetCore" />
<add name="aspNetCore" path="" verb="" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore startupTimeLimit="3600" processPath="MyApp.exe" stdoutLogEnabled="true" stdoutLogFile="\?\%home%\LogFiles\stdout" hostingModel="inprocess">
</aspNetCore>
</system.webServer>
</configuration>
I'm pretty sure the app isn't starting at all. I say this because I added a Trace.WriteLine (outputs to two different files) and an ILogger (outputs to a third file) and none of those files are getting created.
If I type the name of the executable into Kudu console, the output is the following (no error messages).
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: DevPME
info: Microsoft.Hosting.Lifetime[0]
Content root path: D:\home\site\wwwroot
But if I goto App Servics > click Restart, again it hangs a blank page for a couple of minutes until the browser reports "HTTP Error 503. The service is unavailable."
(I seem to recall that originally I tried one time with x86 on this same app, with success, if my memory isn't deceiving me).
Not sure what else to try.