Question

I am writing a WCF Service Application in Visual Studio 2010 using .NET Framework 4.0.

I am trying to implement BasicHttpBinding with HTTPS. I read in some example that I need to create a custom binding as follow and to set it as "bindingConfiguration" attribute while setting up an endpoint.

<bindings>
<basicHttpBinding>
<binding
configurationName="UsingHttps"
securityMode="Https"/>
</basicHttpBinding>
</bindings>

However, when I try to write similar in my web.config, the intellisense is not showing "configurationName" and "securityMode" attributes. What can be the reason here? Do I need to change any setting in Visual Studio IDE?

Any help on this, much appreciated.

Thanks

Nirman

Was it helpful?

Solution

You have got the attribute names wrong, and tried to set the security mode in the wrong place:

<binding name="myBindingName">
    <security mode="Transport">
        ...etc...
    </security>
</binding>

This old (July 2007!!) MSDN article has plenty of examples of both programmatic and static configuration of bindings, transport security, etc: WCF Bindings In Depth (the whole magazine is now packaged as a CHM download, but you can see the specified article directly online on wayback machine).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top