Question

I'm trying to deploy my WCF web service to a free host to test it, but it gives me the following error:

The Binding with name WSDualHttpBinding failed validation because the Binding type System.ServiceModel.WSDualHttpBinding is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment.

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

No correct solution

OTHER TIPS

The hosting environment is set to partial trust so that your code won't be able to interfere with other people's code. There's no way for you to elevate the permissions the hosting environment grants you.

This means that you're limited to BasicHttpBinding, BasicHttpContextBinding, WebHttpBinding, WSHttpBinding, WSHttpContextBinding and WS2007HttpBinding.

You set set your website to use medium trust (most likely what your host is using) so that you can test your site locally with the same limitations as your host enforces. Add to your web.config to do this.

very simple just add below lines to your web.config file

 <configuration> 
  <system.web> 
    <trust level="Full" /> 
  </system.web> 
  </configuration>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top