ASP.NET Core 3.1 site in Azure never loads

Adam Driscoll 1 Reputation point
2020-09-14T16:32:51.347+00:00

Hello,

I'm trying to run an ASP.NET Core 3.1 web app in Azure Web Apps. I've run a lot of web apps before and haven't had the issue I'm running into. The web app is published as win-x64. It can be found on the Windows ZIP link here: https://imsreleases.blob.core.windows.net/universal/production/1.3.1/Universal.win-x64.1.3.1.zip

This web app runs fine when I create a Docker based Web App rather than a Code web app. This web app also runs fine in IIS locally.

I'm running a B1 with .NET Core as the framework and the architecture is set to x64. I've tried InProcess and OutOfProcess hosting. This web app started once and I cannot get it to start any longer.

There is no console output. I put a Console.WriteLine at the top of my Main() in the app's Program.cs that is never printed.

Event View shows this.

<Event>  
<System>  
<Provider Name="IIS AspNetCore Module V2"/>  
<EventID>1020</EventID>  
<Level>1</Level>  
<Task>0</Task>  
<Keywords>Keywords</Keywords>  
<TimeCreated SystemTime="2020-09-11T18:11:49Z"/>  
<EventRecordID>63691671</EventRecordID>  
<Channel>Application</Channel>  
<Computer>RD0003FF64B6F4</Computer>  
<Security/>  
</System>  
<EventData>  
<Data>Application '/LM/W3SVC/31654852/ROOT' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline 'Universal.Server.exe ' with multiple retries. Failed to bind to port '14205'. First 30KB characters of captured stdout and stderr logs from multiple retries: </Data>  
<Data>Process Id: 3460.</Data>  
<Data>File Version: 13.1.20234.8. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: c75b3f7a2fb9fe21fd96c93c070fdfa88a2fbe97</Data>  
</EventData>  
</Event>  

As you can see, there is no stdout. Logstream shows nothing from my web app's console. Here's an example of the stream when trying to start the app with verbose logging on: https://pastebin.com/qwJCcBjd

I have enabled enhanced diagnostic logging via the web.config: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1#enhanced-diagnostic-logs but it does not return anything.

I have tried a dotnet new webapp and published that to the same Azure resource, and that loads. I'm obviously missing something but Azure is providing me with no information what that something is.

This is my current web.config. I've tried lot's and lot's of combinations of things. InProcess, OutOfProcess, dotnet instead of the exe, stdout on and off.

<?xml version="1.0" encoding="utf-8"?>  
<configuration>  
  <location path="." inheritInChildApplications="false">  
    <system.webServer>  
      <handlers>  
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />  
      </handlers>  
      <aspNetCore processPath="Universal.Server.exe" arguments="" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile=".\logs\log" hostingModel="outofprocess">  
          <handlerSettings>  
            <handlerSetting name="debugFile" value=".\logs\aspnetcore-debug.log" />  
            <handlerSetting name="debugLevel" value="FILE,TRACE" />  
          </handlerSettings>  
      </aspNetCore>  
    </system.webServer>  
  </location>  
</configuration>  

I've I open the Kudu tools and run my web app in the process starts.

24562-image.png

I'm pretty stumped on this. I'll probably focus on getting the docker web app working like I want but figured I would reach out to see if anyone has any ideas on how I can troubleshoot this.

I'm happy to provide anymore information that may be necessary.

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,321 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 13,456 Reputation points Microsoft Employee
    2020-09-30T08:56:52.583+00:00

    To benefit the community -updating offline discussion/solution here:

    The following steps were taken for the fix.

    • Configured the Web.Config to use the explicit route to save the stdout logs.
    • Removed the .Net Core x86 extension from App Service WebApp

    So, the issue was a combination of both the Web.Config not being properly set and the x86 extension installed.

    Thanks @Adam Driscoll for your co-operation on this.

    No comments