如果我通过 IIS UI,我可以选择一个站点,在 IIS 下打开身份验证,然后编辑匿名身份验证以使用应用程序池标识。但是,当我尝试使用 appcmd 做同样的事情时遇到了一个问题:
appcmd set config "SiteName" /section:anonymousAuthentication /userName:
当我运行它时,我得到以下信息:
ERROR ( message:Can not set attribute "userName" to value "".. Reason: 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".
. )
现在,我显然可以通过 UI 做到这一点,所以我的 appcmd 命令必须尝试做一些不同于我通过 UI 完成的事情。问题是,如何使用 appcmd 复制我的 UI 操作?