I got Security Exception error: “System.Security.SecurityException: That assembly does not allow partially trusted callers.” when implement Implement Google Captcha with C#.
Fix the Security Exception issue
In order to resolve the issue “System.Security.SecurityException: That assembly does not allow partially trusted callers.”, simply add <trust level="Full" /> in the web.config file in system.web section as below:
web.config:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> <customErrors mode="Off"/> <trust level="Full" /> </system.web> <appSettings> </appSettings> </configuration> |