发布网站,报Access to the path is denied的解决办法

错误:

Server Error in ‘/’ Application.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred loading a configuration file: Access to the path ‘f:\pacms\web.config’ is denied.

原因:出现这个问题是因为web.config没有修改权限导致的

解决方法:给网站目录写入权限,目录权限配置请见下面的相关文档。

网站目录权限设置
PageAdmin目录需如下权限
administrators —>完全控制权限
system —>完全控制权限
network service (或aspnet)—>读取、写入、运行、修改、列出文件夹权限
everyone(如单独分配用户的,给相应用户的权限)—>用户修改、运行、列出文件夹改、读取、写入权限

目录权限增加方法:

1、找到你的pageadmin安装目录,我的放在F:\fabu web目录下,我们需要给fabu web目录相应的权限,右键目录,选择属性
这里写图片描述
2、点击属性后点击安全选项卡后,增加 everyone用户(有的电脑还需要增加aspnet用户或network service用户),勾选下面的读取和写入权限(有的电脑需要勾选修改权限),本机直接勾选完全控制也可以。
这里写图片描述