added samples
[windows-sources.git] / sdk / samples / WCFSamples / TechnologySamples / Extensibility / Security / AuthorizationPolicy / CS / client / App.config
blobea2fb1eb16e14b8b92aad38b95bda6aaa708aa29
1 <?xml version="1.0" encoding="utf-8" ?>
2 <configuration>
3 <system.serviceModel>
5 <client>
6 <!-- Username based endpoint -->
7 <endpoint name="Username"
8 address="http://localhost:8001/servicemodelsamples/service/username"
9 binding="wsHttpBinding"
10 bindingConfiguration="Binding1"
11 behaviorConfiguration="ClientCertificateBehavior"
12 contract="Microsoft.ServiceModel.Samples.ICalculator">
13 </endpoint>
14 <!-- X509 certificate based endpoint -->
15 <endpoint name="Certificate"
16 address="http://localhost:8001/servicemodelsamples/service/certificate"
17 binding="wsHttpBinding"
18 bindingConfiguration="Binding2"
19 behaviorConfiguration="ClientCertificateBehavior"
20 contract="Microsoft.ServiceModel.Samples.ICalculator">
21 </endpoint>
22 </client>
24 <bindings>
25 <wsHttpBinding>
26 <!-- Username binding -->
27 <binding name="Binding1">
28 <security mode="Message">
29 <message clientCredentialType="UserName" />
30 </security>
31 </binding>
32 <!-- X509 certificate binding -->
33 <binding name="Binding2">
34 <security mode="Message">
35 <message clientCredentialType="Certificate" />
36 </security>
37 </binding>
38 </wsHttpBinding>
39 </bindings>
40 <behaviors>
41 <endpointBehaviors>
42 <behavior name="ClientCertificateBehavior">
43 <clientCredentials>
44 <serviceCertificate>
45 <!--
46 Setting the certificateValidationMode to PeerOrChainTrust means that if the certificate
47 is in the user's Trusted People store, then it will be trusted without performing a
48 validation of the certificate's issuer chain. This setting is used here for convenience so that the
49 sample can be run without having to have certificates issued by a certificate authority (CA).
50 This setting is less secure than the default, ChainTrust. The security implications of this
51 setting should be carefully considered before using PeerOrChainTrust in production code.
52 -->
53 <authentication certificateValidationMode="PeerOrChainTrust" />
54 </serviceCertificate>
55 </clientCredentials>
56 </behavior>
57 </endpointBehaviors>
58 </behaviors>
60 </system.serviceModel>
62 </configuration>