Noni
Noni

Reputation: 369

Security Exception at 1and1 hosting deployment on mvc project

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.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I try trust level high tag in web config but still face same problem

Upvotes: 0

Views: 403

Answers (1)

AccuWebHosting.Com
AccuWebHosting.Com

Reputation: 1159

You don't have to change the trust level in web.config of your own application. Most probably, IIS of your host is configured to run on lower trust level (most probably Medium Trust level) and individual web applications are not allowed to override the main config file. Hence, even if you change the trust level to Full, you won't be able use the Full trust level.

You can ask your web host if they allow you to use full trust level. If they deny you will have to configure your web application to run with low trust levels, or move to web host who supports Full Trust level hosting.

Upvotes: 1

Related Questions