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?
source share