Event Log SecurityException for Web Application?
问题 I have an app that writes messages to the event log. The source I'm passing in to EventLog.WriteEntry does not exist, so the Framework tries to create the source by adding it to the registry. It works fine if the user is an Admin by I get the following whe the user is not an admin: "System.Security.SecurityException : Requested registry access is not allowed." message. How can I fix that? Update I have create the registry with the Admin account manually in the registry. Now, I have the error