G
Guest
I have been looking at tutorials on event logging and utilising the EventLog class. The code shown in these tutorials will typically be as shown below:
EventLog ev = new EventLog()
ev.Log = "Application"
ev.Source = "Test"
ev.WriteEntry("test entry")
When I try and run this on my own development environment however I get an exception thrown stating that "Requested registry access is not allowed.". I can get round this by making giving the ASPNET user administrator rights. A similar exception is thrown if I try and use the static methods 'SourceExists' or 'CreateEventSource'.
Is making ASPNET an administrator required for this to work or is there another permission setting that I am missing
Regards, Andy
EventLog ev = new EventLog()
ev.Log = "Application"
ev.Source = "Test"
ev.WriteEntry("test entry")
When I try and run this on my own development environment however I get an exception thrown stating that "Requested registry access is not allowed.". I can get round this by making giving the ASPNET user administrator rights. A similar exception is thrown if I try and use the static methods 'SourceExists' or 'CreateEventSource'.
Is making ASPNET an administrator required for this to work or is there another permission setting that I am missing
Regards, Andy