在带有 IIS 8.5 的 windows server 2012r2 机器上,我有一个纯 html 站点,其中包含 web.config。
我的配置:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows"/>
</system.web>
</configuration>
不幸的是,IIS 似乎没有选择我的身份验证模式设置。我可以通过将身份验证类型设置为 windows 来在 IIS 中进行这项工作,但这将涉及我更新每台服务器。IIS 是否有某种方法可以从 web.config 中提取配置,以便在部署时正确设置该值?这似乎是处理 IIS 和 web.config 的几乎所有其他事情的情况,所以我敢说我没有做正确的事情。