T
toupeira23
Hello
I'm trying to connect to another server via WMI, and it works just
fine. But everytime it first tries to connect with the current user
credentials, which naturally don't exist on the remote server,
resulting in Failure Audit entries in the EventLog. After some googling
I discovered that this is a known problem, but nobody has a workaround.
So I thought I'd try again ;-)
Here's some sample code to demonstrate the behaviour:
using System;
using System.Management;
public class test
{
public static void Main()
{
ConnectionOptions opts = new ConnectionOptions();
opts.Username = "XXXXXXXX";
opts.Password = "XXXXXXXX";
ManagementScope scope = new ManagementScope(@"\\XXX\root\cimv2",
opts);
scope.Connect();
}
}
After running this code, the remote server has 2 entries each for event
ID 529 & 680.
I've tried all settings for ImpersonationLevel and Authentication, and
also setting Authority to "NTLMDOMAIN:<name of remote server>". And
using Kerberos authentication wouldn't help, as the servers are not in
a domain (which is the reason I need to use ConnectionOptions in the
first place).
The .NET version is 1.1.4322, and I've tested it on Windows 2003, 2000
and XP, and it's the same everywhere.
greetings,
markus
I'm trying to connect to another server via WMI, and it works just
fine. But everytime it first tries to connect with the current user
credentials, which naturally don't exist on the remote server,
resulting in Failure Audit entries in the EventLog. After some googling
I discovered that this is a known problem, but nobody has a workaround.
So I thought I'd try again ;-)
Here's some sample code to demonstrate the behaviour:
using System;
using System.Management;
public class test
{
public static void Main()
{
ConnectionOptions opts = new ConnectionOptions();
opts.Username = "XXXXXXXX";
opts.Password = "XXXXXXXX";
ManagementScope scope = new ManagementScope(@"\\XXX\root\cimv2",
opts);
scope.Connect();
}
}
After running this code, the remote server has 2 entries each for event
ID 529 & 680.
I've tried all settings for ImpersonationLevel and Authentication, and
also setting Authority to "NTLMDOMAIN:<name of remote server>". And
using Kerberos authentication wouldn't help, as the servers are not in
a domain (which is the reason I need to use ConnectionOptions in the
first place).
The .NET version is 1.1.4322, and I've tested it on Windows 2003, 2000
and XP, and it's the same everywhere.
greetings,
markus