在IIS 8.5中,管理器GUI中是否存在将位置和身份验证标签添加到applicationHost.config文件的设置?

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

我继承了带有冗长applicationHost.config文件的IIS 8.5安装;我对所有选项都不熟悉,并且正在尝试不干扰它,因为它正在工作。

[当我设置一个新的Web应用程序时,要使其正常工作,我必须进入C:\Windows\System32\inetsrv\config\applicationHost.config

并为每个应用程序手动添加以下内容:

    <location path="Default Web Site/MyNewAppPath">
        <system.webServer>
            <security>
                <authentication>
                    <anonymousAuthentication enabled="false" />
                    <basicAuthentication enabled="true" />
                    <windowsAuthentication enabled="true" />
                </authentication>
            </security>
        </system.webServer>
    </location>

或出现错误-“访问被拒绝,错误消息401.2 。:未经授权:由于服务器配置而导致登录失败...”许多帖子/评论说要通过手动添加位置和其他标签来解决此问题,但这似乎很麻烦。

IIS Manager内没有处理这些标记的选项/功能?

FYI IIS管理器正在将以下标记添加到每个应用程序的配置文件中(单独)。希望它可以对位置等标签执行类似操作。

<application path="/MyNewAppPath" applicationPool=".NET 4.5">
     <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\MyNewAppPath" />
 </application>

感谢您的帮助!

authentication iis-8.5
1个回答
0
投票

默认情况下,仅在applicationhost.config中允许子应用程序的身份验证。如果您转到配置管理器,则会看到此

enter image description here

[如果尝试将其设置为根web.config<location path='webapp'>之类的其他位置,则IIS将报告该应用程序已被锁定,并且所有内容均灰显。

enter image description here

您可以通过IIS管理器或命令行设置身份验证,它将自动将这些配置添加到applicationhost.config。我认为这只是普通操作,而不是hacky。

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