在使用IIS Express的Windows 10中,该部分在VIS2019中锁定为父级时发生错误

问题描述 投票:0回答:1

我在Windows 2019上通过IIS Express在VS2019项目中的web.config中的web.config中使用此选项。

<system.webServer>
    <security>
        <authentication>
            <windowsAuthentication enabled="true" />
            <anonymousAuthentication enabled="false" />         
        </authentication>
    </security>
</system.webServer>

但是我得到这个错误

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".

我看了互联网尝试了不同的方法,但似乎没有效果。

我已经修改了文件

  • C:\ Users \ me \ Documents \ project \ .vs \ config \ applicationhost.config
  • C:\ Users \ me \ Documents \ IISExpress \ config \ applicationhost.config

我不确定还有什么尝试。

有人知道吗?

visual-studio iis web-config iis-express
1个回答
0
投票
弄清楚了,我必须编辑另一个文件

C:\Users\me\Documents\project\.vs\project\config\applicationhost.config

© www.soinside.com 2019 - 2024. All rights reserved.