对不起,非描述性标题;不知道该怎么说。因此,当我在命令提示符下运行以下代码时
%systemroot%\system32\inetsrv\appcmd.exe list config "Default Web Site/Local\Service" -section:system.webServer/security/authentication/windowsAuthentication /clr:4
我得到了一个 xml 片段,其中包括
<WindowsAuthentication enabled="false authPersistNonNTLM="true">
我想为此服务启用 Windows 身份验证,然后运行
%systemroot%\system32\inetsrv\appcmd.exe set config "Default Web Site/Local/service" -section:system.webServer/security/authentication/windowsAuthentication /enabled:"True" /commit:apphost
如果我重新运行 orignal list 命令,它仍然返回 windowsAuthentication enabled 状态为 false。set 命令正常工作并启用/禁用我通过进入 IIS 管理器检查的 windowsAuthentication。我认为 set 和 list 应该修改或返回相同的值。我需要让列表正常工作(或其他类似的命令),因为我需要检查我的服务的身份验证状态。所以问题是我错过了什么吗?为什么 set 和 list 似乎在使用两个不同的值,我怎样才能让这个命令(或类似的命令)返回我在 IIS 管理器中看到的服务身份验证的启用状态?
顺便说一句,我正在运行 IIS 7。不确定这是否有所作为。抱歉,如果我遗漏了任何其他必需的详细信息。对IIS不太熟悉。
提前喝彩