阿里云服务器 Access to the path '....' is denied.解决方法

时间:2022-02-01 08:11:40

昨天公司项目迁移服务器,从自己服务器迁移到阿里云服务器,部署完成后发现有一个页面要读取磁盘上的静态文件就报错了。。。

如图:

阿里云服务器  Access to the path '....' is denied.解决方法

解决办法:

在 Web.Config 的 <System.Web> 里加 <identity impersonate="true"/> 节点或者给项目文件目录添加ASP.net的写入权限(一般是IUSER_计算机名)。

阿里云服务器  Access to the path '....' is denied.解决方法