IIS UI を使用すると、サイトを選択し、IIS で認証を開き、匿名認証を編集してアプリケーション プール ID を使用できます。ただし、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 アクションを複製するにはどうすればよいかということです。