Can't read remote system event log
From: Paul Roberts (paulroberts_at_bobos.demon.co.uk)
Date: 09/30/04
- Next message: Eric: "Problem passing computer name to GetObject"
- Previous message: C. Adrian Silasi: "WMI provider specs for Anti-virus & Firewall apps for XP SP2"
- Next in thread: dharani babu: "RE: Can't read remote system event log"
- Reply: dharani babu: "RE: Can't read remote system event log"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Sep 2004 16:23:07 +0100
My app is having trouble reading the system and security logs from some
servers across a network. There are no errors being reported, it's just
that the enumeration comes back with no records. I've had the user run
WBEMTEST, and it gets records without problems.
My app works fine with application logs over the network, and will get
system and security logs when running locally on the server(s) in
question. I'm unable to duplicate the same behaviour on my in-house test
PC running the same OS (W2k server) and service pack (SP4).
I'd really appreciate it if someone could give me advice on how to
troubleshoot this. I don't have access to the client's site so
everything has to be done over the phone and via new releases of my app.
Here's a quick summary of what I'm doing:
1. Call CoInitializeSecurity (details below)
2. Make sure I've got SeSecurity privilege.
3. Create the WBEMLocator and call connect server
4. Call CoSetProxyBlanket (details below) on the resulting proxy
5. Call ExecQuery with "SELECT * FROM Win32_NTLogEvent WHERE
Logfile='Security'"
6. Call CoSetProxyBlanket on the resulting enumerator proxy
OK, so here's my call to CoInitializeSecurity:
CoInitializeSecurity(NULL,-1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL)
And for the call to CoSetProxyBlanket I'm filling out a COAUTHIDENTITY then:
::CoSetProxyBlanket(pProxy, RPC_C_AUTHN_DEFAULT, RPC_C_AUTHZ_DEFAULT,
NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, &coauthID,
EOAC_NONE)
Any ideas?
- Next message: Eric: "Problem passing computer name to GetObject"
- Previous message: C. Adrian Silasi: "WMI provider specs for Anti-virus & Firewall apps for XP SP2"
- Next in thread: dharani babu: "RE: Can't read remote system event log"
- Reply: dharani babu: "RE: Can't read remote system event log"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|