Search code examples
c#remote-accessevent-log

Read the event log from another account C#


I have to develop an Audit C# application, which count the number of openings of each pdf file located in a folder. I've got a regular account on which I develop the application and a another one, which has access to data of the audit. So my question is: How can I access to the EventLogs of another account from my computer?


Solution

  • You can use impersonation as described in this article: How do you do Impersonation in .NET?

    Impersonate with different account and than use standard api to access Event Log.