added samples
[windows-sources.git] / sdk / samples / WCFSamples / TechnologySamples / Extensibility / Security / ClientValidation / CS / service / App.config
blob2bf13704c8a43b468fde21d670bcd278a0eae766
1 <?xml version="1.0" encoding="utf-8" ?>
2 <configuration>
4 <system.serviceModel>
5 <services>
6 <service
7 name="Microsoft.ServiceModel.Samples.CalculatorService"
8 behaviorConfiguration="CalculatorServiceBehavior">
9 <host>
10 <baseAddresses>
11 <add baseAddress="http://localhost:8000/ServiceModelSamples/service"/>
12 </baseAddresses>
13 </host>
14 <!--
15 The CompositeDuplexBindingElement contained in this binding will make the
16 validator throw an exception
17 -->
18 <endpoint address="untrustedDual"
19 binding="wsDualHttpBinding"
20 contract="Microsoft.ServiceModel.Samples.ICalculator" />
21 <!--
22 The ClientCredentialType being is set to Windows on the SecurityBindingElement of
23 this binding and will make the validator throw an exception
24 -->
25 <endpoint address="untrustedNtlm"
26 binding="wsHttpBinding"
27 bindingConfiguration="untrustedNtlmBinding"
28 contract="Microsoft.ServiceModel.Samples.ICalculator" />
29 <!--
30 The TransactionFlowBindingElement of this binding is set to true and will
31 make the validator throw an exception
32 -->
33 <endpoint address="untrustedTransaction"
34 binding="wsHttpBinding"
35 bindingConfiguration="untrustedTransactionBinding"
36 contract="Microsoft.ServiceModel.Samples.ICalculator" />
37 <!-- This enpoint will not make the validator throw -->
38 <endpoint address="safe"
39 binding="basicHttpBinding"
40 bindingConfiguration="safeBinding"
41 contract="Microsoft.ServiceModel.Samples.ICalculator" />
42 <!-- This is the mex endpoint -->
43 <endpoint address="mex"
44 binding="mexHttpBinding"
45 contract="IMetadataExchange" />
46 </service>
47 </services>
49 <bindings>
50 <wsHttpBinding>
51 <binding name="untrustedNtlmBinding">
52 <security mode="Message">
53 <message clientCredentialType="Windows"/>
54 </security>
55 </binding>
56 <binding name="untrustedTransactionBinding"
57 transactionFlow="true">
58 <security mode="Message">
59 <message clientCredentialType="Certificate"/>
60 </security>
61 </binding>
62 </wsHttpBinding>
63 <basicHttpBinding>
64 <binding name="safeBinding">
65 <security mode="Message">
66 <message clientCredentialType="Certificate"/>
67 </security>
68 </binding>
69 </basicHttpBinding>
70 </bindings>
72 <!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->
73 <behaviors>
74 <serviceBehaviors>
75 <behavior name="CalculatorServiceBehavior">
76 <serviceMetadata httpGetEnabled="True"/>
77 <serviceDebug includeExceptionDetailInFaults="False" />
78 <serviceCredentials>
79 <serviceCertificate findValue="localhost" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" />
80 <clientCertificate>
81 <!--
82 Setting the certificateValidationMode to PeerOrChainTrust means that if the certificate
83 is in the user's Trusted People store, then it will be trusted without performing a
84 validation of the certificate's issuer chain. This setting is used here for convenience so that the
85 sample can be run without having to have certificates issued by a certificate authority (CA).
86 This setting is less secure than the default, ChainTrust. The security implications of this
87 setting should be carefully considered before using PeerOrChainTrust in production code.
88 -->
89 <authentication certificateValidationMode="PeerOrChainTrust" />
90 </clientCertificate>
91 </serviceCredentials>
92 </behavior>
93 </serviceBehaviors>
94 </behaviors>
96 </system.serviceModel>
98 </configuration>