Hosting a WCF Service on a Partial Trust Server

I am trying to deploy my WCF web service to a free host to test it, but it throws the following error:

A binding named WSDualHttpBinding failed validation because the binding type System.ServiceModel.WSDualHttpBinding is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or placing your application in a full trust environment.

Any ideas how I can set up my hosting environment to Full-Trust or any other ways to solve it?

+1


source to share


2 answers


Partial trust is established in the hosting environment, so your code cannot interfere with other people's code. You do not need to increase the permissions provided by the hosting environment.

This means you are limited to BasicHttpBinding, BasicHttpContextBinding, WebHttpBinding, WSHttpBinding, WSHttpContextBinding, and WS2007HttpBinding.



You have established that your website is using a medium trust level (most likely your host is using it) so you can test your site locally with the same restrictions as your host. Add web.config to this.

+4


source


very simple to add below lines to web.config file



 <configuration> 
  <system.web> 
    <trust level="Full" /> 
  </system.web> 
  </configuration>

      

0


source







All Articles