Security exception when trying to view MVC website on go daddy

I just uploaded my MVC 4 website to goddady website. When I try to view it, I get:

Security exception

Description: The application attempted to perform an operation not permitted by the security policy. To grant this application the required permissions, contact your system administrator or change the application trust level in the configuration file.

Exception Details: System.Security.SecurityException: A permission request of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' failed.

I tried to set the trust level completely, but I still get the same error. Here is my system.we section from the web configuration:

<system.web> <securityPolicy> <trustLevel name="Full" policyFile="internal"/> </securityPolicy> <customErrors mode="Off"/> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> 

Can anyone see the problem?

0
source share
1 answer

You can try to add a level attribute with the value Full for the trust item as follows

  <trust level="Full" /> 
+2
source

All Articles