次のコードを使用して、AD ベースの Web アプリケーションのローカル ログイン ユーザーを取得しようとしています。
これが私がしようとしていることです。
string CurrentUser = WindowsIdentity.GetCurrent().Name;
PrincipalContext context = new PrincipalContext(ContextType.Domain, "isd");
UserPrincipal upUser = UserPrincipal.FindByIdentity(context, CurrentUser);
if(upUser != null)
{
}
ただし、isd\whoever ではなく、ユーザーとして「IIS APPPOOL\DefaultAppPool」を返します。
IIS7 と .net 4 です
ありがとう