开发者

EvtOpenChannelEnum access denied

开发者 https://www.devze.com 2023-03-05 08:35 出处:网络
I\'m calling EvtOpenChannelEnum after having gotten a valid session handle with EvtOpenSession.EvtOpenSession worked, but EvtOpenChannelEnum is returning access denied (GetLastError = 5).

I'm calling EvtOpenChannelEnum after having gotten a valid session handle with EvtOpenSession. EvtOpenSession worked, but EvtOpenChannelEnum is returning access denied (GetLastError = 5).

Why would t开发者_运维问答his be? If there was an access problem, I'd expect to hit it with the EvtOpenSession call. What's more perplexing, the user can get on the same computer with my program, logged in as the same user, and use the Windows Event Log Viewer (2008, so assuming it's using the same API) and it works fine.

Stumped...


You do not have the required permission on the remote server. This is not checked immediately, but when you use the handle for the first time.

From the docs for EvtOpenSession:

This function does not validate the credentials; the credentials are validated the first time you try to use the session handle. If the credentials are not valid, the call will fail with ERROR_ACCESS_DENIED.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号