I am able to read the data from the application event logs but when i try the security i get an error

Requested registry access is not allowed.
{"Cannot open log security on machine .. Windows has not provided an error code."}
{"A required privilege is not held by the client"}

Anyone know how to sort this?

I am using Vista

9 Years
Discussion Span
Last Post by smelf1

Try to run your application as administrator, right click on your executable then Run as Administrator, try and tell me what you get.


Hi mate,

I am a full administrator, i think its another one of these great security features added into vista.

I can read from the other event logs just not from the security one


i am just running the progrma from inside vs 2008, how do i create it as an exe?


ah right sorry i taught you wanted me to create an exe of the project then run it.

If i run vs2008 as administrator it read from the security logs.

But how do i get it to allow me to run them from my user?


Logical, non administrative staff can't read this information! right? so if your user is administrator he can do what we've done -> right click on your application and run it as administrator.


the problem is the program when finished will be running as a windows service so will require no user interaction. Its just going to mine data and pass it back to the database.

So i need to get it to allow me to access the security logs.


Look to deploy it as windows service, should be also installed as administrator! then it'll work without any interaction with the current user.


ah cool, i was going to deploy it as a windows service, i have a test service running so once i get that code perfected i will drop the code to read the event logs into it.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.