Home > Back-end >  stdout log files are empty in azure web service
stdout log files are empty in azure web service

Time:02-10

I have created an azure web service app used for testing purposes and run into a .Net / http issue (500.30). Ive looked into a lot of troubleshooting but nothing has worked or pointed me in the right direction.

It seems to get more info on the issue, I can use the stdout logs in the Azure app service through Kudu. This has been configured this and the files it creates are blank? Has anyone encountered this before?

What have I did, I set it up in the web.config file setting the stdlog to true but this creates the files with no info. I then removed the inprocess=hosting section as I read this fixed it for others but no joy.

Any pointers in the right direction would be appreciated

CodePudding user response:

You need to enable application logging first.

  1. Click on the App Service logs menu
  2. In Application logging, select File System
  3. In Quota (MB), specify the disk quota for the application logs. In Retention Period (Days), set the number of days the logs should be retained.
  4. Save

You can stream the logs from the portal or by using the CLI

az webapp log tail --name appname --resource-group myResourceGroup

CodePudding user response:

HTTP Error 500.30, The log file is created but empty - This kind of scenario is trapped by the SDK when publishing a self-contained app.

There is a term called RID (Runtime Identifier) used to identify target platforms where a .NET Core application runs.

If the RID doesn't match the platform target then the SDK produces the above kind of errors.

For example, win10-x64 RID with <PlatformTarget>x86</PlatformTarget> in the project file.

Troubleshooting steps:

  • <PlatformTarget>x86</PlatformTarget> enables the IIS app pool for 32-bit apps in an x86 framework-dependent deployment and set Enable 32-bit Apps to True from the app pool's Advanced Settings of IIS Manager.

500.30 is In-Process Startup Failure as it's cause can be usually determined from entries in the Application Event Log and the ASP .NET Core Module stdout log.

  • The app is misconfigured due to targeting a version of the ASP .NET Core shared framework that isn't present. Check which versions of the ASP .NET Core Shared framework are installed on the target Machine.
  • If you're using Azure Key Vault, check the policies in the targeted Key Vault to ensure that the correct permissions are granted.

Also, Please visit this Thread related to logging not working fix.

  • Related