【ASP.NET】 Config Error: This configuration section cannot be used at this path.

Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false"

相信不少同学在搞ASP web的开发时候,好不容易配置完毕,部署到IIS之后打开浏览器看到的是这个error。简而言之就是目前你部署的IIS的默认Authentication认证的权限与你的web权限不一致,默认是使用IIS的默认配置的。

所以请遇到这个问题的同学按照如下步骤修改试试是否work:

  1. 打开IIS
  2. 锁定根目录,找到Feature Delegation
  3. 老铁双击之后显示一个list
  4. 找到Authentication-对应windows或者其他,根据你的情况而定。
  5. 将read only改成 read/write
  6. 重新load你的web。
  7. 加上我解决问题时查到的资料

追加:
上述方案是基于你的web已经部署到了IIS当中,如果你直接F5debug模式下,需要修改applicationhost.config,这个东西类似于一个父级别的config,你的web config作用级别没有人家的高。(别问我是怎么发现的)

这个文件修改的内容如下:


希望可以帮助到你,如有问题可以留言或者点击下方图片联系我!
N|Dennis

posted @ 2019-01-11 14:31  YanyuWu  阅读(1377)  评论(0编辑  收藏  举报