Skip to content
Advertisement

Azure Linux Web App Service – System.IO.IOException: Readonly File Error

The web app already running on .NET Core 3.1 LTS with IIS (windows server 2019)

Recently, I deployed as an Azure Web App Service but I encountered a file write error.

The application trying to create a new file for some business requirement.

Error message; System.IO.IOException: Read-only file system

Has anyone encountered this problem on Azure Linux Web App?

Solved: The Azure Linux Web App Service doesn’t support directly file uploading to a regular folder under the wwwRoot. If you can running on the linux web app service, you need to use blob / storage etc..

Advertisement

Answer

Azure web app recommends that the wwwroot folder has read and write permissions. Whether it’s Linux or Windows, it’s the same.

In addition, it is not recommended to put the content of file operations in the project directory. For example, excel files generated under a certain business or uploaded image files in the deployment file. And the files are recommended to be stored in azure storage.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement