You may come across this error when you run your ASP.NET application first time:
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.FileIOPermission, mscorlib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.
All about permissions. You need to grant required permissions to your application. To do this, simply add the code below into your
<system.web> <securityPolicy> <trustLevel name="Full" policyFile="internal"/> </securityPolicy> <trust level="Full" originUrl=""/> </system.web>