This project is read-only.

Code access exception

Jan 14, 2009 at 5:23 AM
Edited Jan 14, 2009 at 5:26 AM
Getting a security exception. Are you running it in medium trust on your site?

Description: The 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. 

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, 
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]   System.Security.CodeAccessSecurityEngine.Check(Object demand, 
StackCrawlMark& stackMark, Boolean isPermSet) +0   System.Security.CodeAccessPermission.Demand() +59   System.Diagnostics.Trace.get_Listeners() +53   
GateKeeper.Tracing..ctor(String switchName, String description) +160   GateKeeper.Tracing..ctor(String switchName) +11   
GateKeeper.GateKeeperModule..cctor() +26
Jan 14, 2009 at 5:31 AM
Have you selected to encrypt the password? 
'System.Security.Permissions.SecurityPermission, mscorlib,
The mscorlib error might be because you don't have enough rights to use the DPAPI calls.  Try configuring the ~/App_Data/GateKeeper.config file to not store the password encrypted and see if you still get that error.  Let me know...