Search code examples
azure-web-app-serviceasp.net-core-2.2

Azure App Service stdout is empty for ASP.NET Core 2.2


Unable to log error in stdout log from ASP.NET Core 2.2 in Azure App Service. The stdout log files is created but empty.

The web.config configuration in <system.webServer>:

<aspNetCore processPath="dotnet" arguments=".\xxx.dll" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" hostingModel="InProcess" />      

Solution

  • The problem can be solved by temporary removing the hostingModel="InProcess" then errors are logged in the stdout log files.

    hostingModel="InProcess" removed:

    <aspNetCore processPath="dotnet" arguments=".\xxx.dll" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" />