I need to read from the security log in windows, but the user will not have the administrative permissions to do so, and the application will throw an exception,
EventLog[] a = EventLog.GetEventLogs();
foreach (var item in a)
{
if (item.Log == "Security")
{
foreach (EventLogEntry item2 in item.Entries)//The exception thrown here
{
//TODO
}
}
}
I just want to read, I don't want to write anything. How to gain access to these entries without those permissions?