Home » Development » Solved: “Application trust level” error on ASP.NET pages

Solved: “Application trust level” error on ASP.NET pages

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=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

ASP.NET trust level error
ASP.NET trust level error


All about permissions. You need to grant required permissions to your application. To do this, simply add the code below into your web.config file.

          <trustLevel name="Full" policyFile="internal"/>
     <trust level="Full" originUrl=""/>

For more info:

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.

1 thought on “Solved: “Application trust level” error on ASP.NET pages”

Leave a Comment