Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
System.Security.SecurityException: Request for the permission of type 'System.Diagnostics.EventLogPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.


he application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Posted

The key information here is: "To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file."

You will need to specifically set your applications trust level and/or permissions to allow access to the event log.

http://social.msdn.microsoft.com/Forums/vstudio/en-US/95d5c5e0-7b74-4880-84d7-5329891ab86a/eventlogpermission?forum=clr[^]

[Edit] You may find this article useful as well as it lists the permissions against various trust levels:

http://msdn.microsoft.com/en-us/library/vstudio/87x8e4d1(v=vs.100).aspx[^]
 
Share this answer
 
v2
Please check out this post here

Hope this help!

Brs,
--
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900