网站无法在 Visual Studio 2015 Enterprise 中启动,但在 2013 Pro 中运行良好

Website will not start in Visual Studio 2015 Enterprise, but works fine in 2013 Pro

我在从 VS 2015 Enterprise 运行创建网站时遇到问题,而在从 VS 2013 Pro 运行创建网站时没有问题。我得到的错误是:

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

错误代码:0x80070021

配置来源:

<authentication>
<windowsAuthentication enabled="true" /> <-- this line is red
</authentication>

我还为所有标签以及应用程序主机将 machine.config 值设置为 Allow

此外,当尝试直接从 IIS 服务器管理器 运行 它时(指向与源文件相同的位置),我得到 503 Service Unavailable.

如果需要,我可以提供更多信息。

我尝试过的其他解决方案:

我能够通过修改 applicationhost.config 文件来解决这个问题,在我的解决方案的 .vs 文件夹中,并将指定的元素标记为允许覆盖。