A Permission question
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
I'm trying to operate with event logs in my asp.net application,here is my code:
EventLog ev = new EventLog("MyAppLog",".","MyApp"); EventLogPermission ep = new EventLogPermission(PermissionState.Unrestricted); ep.Assert(); ev.Clear();
A Win32Exception raised when runing to ev.Clear(): System.ComponentModel.Win32Exception:Aceess denied. What's the problem in my code? Or any other advice to me? Note these code is running under the ASPNET windows account. Regards