gpt4 book ai didi

asp.net - IIS Express applicationhost.config - 身份验证错误

转载 作者:行者123 更新时间:2023-12-03 11:09:38 24 4
gpt4 key购买 nike

我在 Windows 10 下运行 IIS Express(不要与普通 IIS 混淆)。我的理解是设置存储在“My Documents\IISExpress\config\applicationhost.config”中

当使用创建 asp.net 核心项目时,这些设置可以被本地 web.config 文件覆盖。

尝试使用此 web.config 时

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="" inheritInChildApplications="false">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<windowsAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
</configuration>

我收到以下错误。

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

识别这条线

<authentication>
**<anonymousAuthentication enabled="false" />**
<windowsAuthentication enabled="true" />

尽管将此行更改为状态允许

<section name="anonymousAuthentication" overrideModeDefault="Allow" />

还有其他我应该寻找的地方吗?

最佳答案

基于收到的反馈。

在 visual studio 中工作时,配置文件的正确位置是 {ProjectDirectory}.vs\config\applicationhost.config。

“我的文档\IISExpress\config\applicationhost.config”不正确

关于asp.net - IIS Express applicationhost.config - 身份验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54450447/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com