2つのXP Pro SP3マシンがあります。私は両方でファイアウォールを無効にしました。ワークグループ名はWORKGROUPです。私は両方のユーザ名/パスワードが同じ管理者アカウントを持っています。私は常にテキストでSystem.UnauthorizedAccessException
を取得C#でXP ProマシンからWMI接続を別のドメイン(ドメイン、同じワークグループではない)にすることができません
ConnectionOptions options = new ConnectionOptions();
options.Username = myUsername;
options.Password = myPassword;
options.Authority = "ntdlmdomain:WORKGROUP"; // Commenting this or not makes no difference
ManagementScope scope = new ManagementScope(String.Format("\\\\{0}\\{1}", hostname, Namespace), options);
scope.Connect();
:
"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
上記のコードは、同じADドメインの一部である2台のマシン間で動作します接続するために私のコードは以下の通りです。私は間違って何をしていますか?