views:

781

answers:

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  A: 

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.