【发布时间】:2011-10-06 03:16:15
【问题描述】:
我正在尝试使用 powershell 在 IIS 中的站点上设置 windowsauth,到目前为止,这部分脚本在所有环境中都有效,现在失败了,我不知道为什么。
Set-WebConfigurationproperty system.webServer/security/authentication/anonymousAuthentication -name enabled -value false -PSPath "IIS:\" -location $siteName
Set-WebConfigurationproperty system.webServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath "IIS:\" -location $siteName
有人知道为什么这个脚本会失败吗?
我收到“无法读取配置节‘system.serviceModel’,因为它缺少节声明”
我可以手动启用 Windows 身份验证,并且网站正常运行。
干杯
【问题讨论】:
标签: wcf iis powershell