I have an application that is attempting an access to our registry
private void VerifyValidSource()
{
try
{
if (!EventLog.SourceExists(applicationName))
{
EventLog.CreateEventSource(applicationName, logName);
}
}
catch(SecurityException e)
{
throw new SecurityException(String.Format(resourceManager.GetString("RES_DEFAULTPUBLISHER_EVENTLOG_DENIED"), applicationName),e);
}
}
However we are getting an error when debugging the app.
{System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
at System.Diagnostics.EventLog.SourceExists(String source, String machineName)
at System.Diagnostics.EventLog.SourceExists(String source)
at Microsoft.ApplicationBlocks. ...
Go to the complete details ...