<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WCF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<system.serviceModel>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Behaviors
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<behaviors>
<endpointBehaviors>
<behavior name="FooBehavior">
<!--
The clientCredentials behavior allows one to define a certificate to present
to a service. A certificate is used by a client to authenticate itself to the service
and provide message integrity. This configuration references the "client.com"
certificate installed during the setup instructions.
-->
<clientCredentials>
<serviceCertificate>
<!--
Setting the certificateValidationMode to PeerOrChainTrust means that if
the certificate is in the user's Trusted People store, then it will be
trusted without performing a validation of the certificate's issuer chain.
This setting is used here for convenience so that the sample can be run
without having to have certificates issued by a certificate authority (CA).
This setting is less secure than the default, ChainTrust. The security
implications of this setting should be carefully considered before using
PeerOrChainTrust in production code.
-->
<authentication certificateValidationMode="None" />
<!-- PeerOrChainTrust -->
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Bindings
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<bindings>
<wsHttpBinding>
<binding
name="FooBinding"
openTimeout="00:01:00" closeTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
maxBufferPoolSize="5242880" maxReceivedMessageSize="655360"
useDefaultWebProxy="true" bypassProxyOnLocal="false"
messageEncoding="Text" textEncoding="utf-8"
hostNameComparisonMode="StrongWildcard"
allowCookies="false"
transactionFlow="false"
>
<readerQuotas
maxDepth="32"
maxStringContentLength="81920"
maxArrayLength="163840"
maxNameTableCharCount="163840"
maxBytesPerRead="4096"
/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message
clientCredentialType="Certificate" negotiateServiceCredential="true"
algorithmSuite="Default"
/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Services
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<client>
<endpoint
name="FooEndPoint"
address="http://foo.company.com:1234/FooService.svc"
contract="Service.IFooService"
binding="wsHttpBinding"
bindingConfiguration="FooBinding"
behaviorConfiguration="FooBehavior"
>
<identity>
<dns value="Foo Service" />
</identity>
</endpoint>
</client>
</system.serviceModel>