Azure App self-contained x-64 deployment won't start

JAL 591 Reputation points
2020-11-07T06:31:46.557+00:00

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

&lt;System&gt;
    &lt;Provider Name=&#34;W3SVC-WP&#34;/&gt;
    &lt;EventID&gt;2282&lt;/EventID&gt;
&lt;/System&gt;
&lt;EventData&gt;
    &lt;Data&gt;D:\home\SiteExtensions\AspNetCoreRuntime.3.1.x86\ancm\aspnetcorev2.dll&lt;/Data&gt;
    &lt;Data&gt;AMD64&lt;/Data&gt;
    &lt;Binary&gt;C1000000&lt;/Binary&gt;
&lt;/EventData&gt;

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.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,675 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,011 Reputation points Microsoft Employee
    2020-11-11T03:08:49.563+00:00

    Hi @JAL ,

    Sorry to hear that your experiencing issues getting your application deployed. I definitely want to help your overcome this issue. I'm also assuming you created your app service when you created your publish file. If you created it a separate way, please list out the steps you did to create it. If you weren't aware, the steps for enabling diagnostic logging are documented here.

    Can you provide any additional details about the 503 you're receiving? If you did you a File -> New ASP.NET Core project, the boiler plate code should have

    if (env.IsDevelopment())  
    {  
        app.UseDeveloperExceptionPage();  
    }  
    

    in the ConfigureMethod. We can add ASPNETCORE_ENVIRONMENT set Development on the app service which should show us more details on where the 50x is being generated from.

    38982-image.png

    Regards,
    Ryan

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.