1

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?

2 Answers 2

4

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.

0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.