Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In .Net 4.0+, <a href="http://msdn.microsoft.com/en-us/library/ee358768.aspx" rel="noreferrer"><strong>Simplified WCF configuration</strong></a> uses the 'anonymous' configurations when configurations are not explicitly set on a per-services basis in the &lt;services&gt; section. If you remove the name="BasicHttpEndpointBinding" from the &lt;binding&gt; element, or if you duplicate that &lt;binding&gt; element as a new element with no name attribute, it will become the default, anonymous binding that your WCF services will use. This is often useful in cases where you need to serve as well as consume WCF services that may not all have the same config - but at least you can set a default config for the services that do not have a specific config set. The default/anonymous concept is also applicable to &lt;behavior&gt; elements.</p> <pre class="lang-xml prettyprint-override"><code>&lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding&gt; &lt;!--Notice, no name attribute set--&gt; &lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; </code></pre> <p>Also, I might add that if your WCF services require authentication, this means that you will either need to consume the service using a real user account, or you will need to grant the the DOMAIN\CLIENTCOMPUTERNAME$ account access to the service - so, perhaps the proper solution for many people may be to alter the configuration to instead allow anonymous access (which is not discussed in my answer). Still, I do sometimes actually elect to secure my WCF services with Windows (Kerberos) authentication.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload