You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Linux Web App Service出现System.IO.IOException只读文件错误如何解决

Azure Linux Web App .NET Core 部署文件写入错误解决方案

问题描述

  • 原有运行环境:基于 .NET Core 3.1 LTS 开发的Web应用,在搭载IIS的Windows Server 2019服务器上运行正常
  • 报错场景:将应用迁移部署到Azure Linux Web App Service后,业务逻辑需要创建新文件时触发报错
  • 报错信息:System.IO.IOException: Read-only file system

根因说明

Azure Linux Web App Service默认将wwwroot目录设为只读文件系统,不支持直接向该目录下的常规文件夹写入、上传文件。

解决方案

请勿直接在Azure Linux Web App的wwwroot目录执行文件写入操作,业务所需的文件存储需求,需搭配使用Azure Blob存储或其他云存储服务实现。


内容的提问来源于stack exchange,提问作者Hotkey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.01 00:39:03