ffe*_*urb 3 windows asp.net iis-express asp.net-core
我在 Windows 10 下运行 IIS Express(不要与普通 IIS 混淆)。我的理解是设置存储在“My Documents\IISExpress\config\applicationhost.config”中
使用创建 ASP.NET Core 项目时,可以通过本地 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>
Run Code Online (Sandbox Code Playgroud)
我收到以下错误。
该配置节不能在此路径中使用。当该部分被锁定在父级别时,就会发生这种情况。锁定可以是默认设置 (overrideModeDefault="Deny"),也可以通过位置标记使用 overrideMode="Deny" 或旧的allowOverride="false" 显式设置。
识别这条线
<authentication>
**<anonymousAuthentication enabled="false" />**
<windowsAuthentication enabled="true" />
Run Code Online (Sandbox Code Playgroud)
尽管将此行更改为状态允许
<section name="anonymousAuthentication" overrideModeDefault="Allow" />
Run Code Online (Sandbox Code Playgroud)
还有其他我应该寻找的地方吗?
根据收到的反馈。
在 Visual Studio 中工作时,配置文件的正确位置是 {ProjectDirectory}.vs\config\applicationhost.config。
“我的文档\IISExpress\config\applicationhost.config”不正确
| 归档时间: |
|
| 查看次数: |
4563 次 |
| 最近记录: |