ASP.NET Core 3.1 site in Azure never loads

Adam Driscoll 1 Reputation point


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:

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.

<Provider Name="IIS AspNetCore Module V2"/>  
<TimeCreated SystemTime="2020-09-11T18:11:49Z"/>  
<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>  

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:

I have enabled enhanced diagnostic logging via the web.config: 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"?>  
  <location path="." inheritInChildApplications="false">  
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />  
      <aspNetCore processPath="Universal.Server.exe" arguments="" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile=".\logs\log" hostingModel="outofprocess">  
            <handlerSetting name="debugFile" value=".\logs\aspnetcore-debug.log" />  
            <handlerSetting name="debugLevel" value="FILE,TRACE" />  

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


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

    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