“Exception: System.ServiceModel.ServiceActivationException: The service ‘/MyService/Service.svc’ cannot be activated due to an exception during compilation. The exception message is: That assembly does not allow partially trusted callers.. —> System.Security.SecurityException: That assembly does not allow partially trusted callers.”
After some research, I found that I’m getting this problem because the WCF service requires full trust permission to run from the server. One way to solve the problem is:
- Open web.config file in notepad
- In <system.web> section add the following tag:
<trust level="Full" originUrl=""/>
These steps solved my problem.