I’ve .dll which is registered and executed from Global Assembly Cache. When I try to access Event Log
EventLog.SourceExists(“source name”)
I’m getting an error:
The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
Is there a way to avoid this error?
thanks in advance
The identity of the application trying to access the Event Log does not have rights to read the Security log. By default, members of the
Administratorsgroup have this right. Your best option would be to grant said rights to the identity (or a group that this identity belongs to that should all have this right) in question. Here’s an article on that.