I was using the System.Diagnostics.EventLog.WriteEntry function, and I kept getting a System.security.securityException about “requested Registry access” not being available. Well, a note for myself – use localsystem not localservice as the account to run under – then it is fine!