DEV Community

loading...

ASP.NET Core: Invalid log file path leads to startup failure on Azure App Service

sven5 profile image Sven Glöckner ・1 min read

I've been using the default web.config with the setting stdoutLogFile=".\LogFiles\stdout" for a while now.
Yesterday, I created new App Service Slot as Staging environment.
My build and release pipeline in Azure DevOps was running fine, but after deployment the App didn't start and I had several errors in the Application Event Logs, for instance:

Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
Invalid runtimeconfig.json [D:\home\site\wwwroot\MyApp.runtimeconfig.json] [D:\home\site\wwwroot\MyApp.runtimeconfig.dev.json]

I searched the web and found this issue on GitHub.
It's already closed so we cannot add additional feedback there.

I've tried the solution there and I was really amazed that afterwards my App Service is running fine.

TL;DR
Change the stdoutLogFile setting to: stdoutLogFile="\\?\%home%\LogFiles\stdout" 😏

Discussion (0)

pic
Editor guide