HEXAQ : A friendly question - answer site for IT professionals

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.


0

My website is hosted under shared hosting service. Since today morning I have started receiving Security exception error on my website

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

How is it possible that a running website starts showing error without any change in code?

Is there any way to solve this error?

Â
asked
 


≡ Total 1 Answer

0

The error message describes that the website doesn't have enough permissions to access the resource on web server.

This is introduced by microsoft since release asp.net 2.0.

You can escape from the error add trust level key in web.config file.

...
...
<system.web>
...
<trust level="Medium" />
...
</system.web>
...
...

Recycle your appPool.

Â
replied


Enter your reply here
Answer Preview: