Errors commonly associated with inadequate Trust Level

By default, the trust level on our servers is configured to "Medium trust." If your application generates any of the error messages below, the most likely cause is that your application requires a trust level higher than medium.
 
You can override the default trust level of your application by modifying the web.config file. See this Knowledge Base article for instructions.
 
- - -
 
Security Exception:
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.
 
- - -
 
Error:
System.Security.SecurityException: That assembly does not allow partially trusted callers.
 
- - -
 
Stack Trace:
[SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
 
- - -
 
Error:
Request for the permission of: type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
 
- - -
 
Unable to connect to any of the specified MySQL hosts. ---> System.Security.SecurityException: Request for the permission of type 'System.Net.SocketPermission, System,
 
- - -
 
Error:
Request for the permission of type
'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.