added samples
[windows-sources.git] / sdk / samples / WCFSamples / TechnologySamples / Basic / Binding / WS / FederationHttp / CS / Service / App.config
blob4f771274205da7e2605bbbf55be4b01b6931dc88
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!--
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 -->
5 <configuration>
6 <system.serviceModel>
7 <bindings>
8 <!-- Service binding using federation -->
9 <wsFederationHttpBinding>
10 <!-- Service binding using SAML and symmetric proof keys -->
11 <binding name="ServiceFed" >
12 <security mode ="Message">
13 <message issuedKeyType ="SymmetricKey" issuedTokenType ="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" >
14 <!-- Metadata address for Security Token Service -->
15 <issuerMetadata address ="http://localhost:8000/sts/mex" >
16 <identity>
17 <certificateReference storeLocation ="CurrentUser"
18 storeName="TrustedPeople"
19 x509FindType ="FindBySubjectDistinguishedName"
20 findValue ="CN=STS" />
21 </identity>
22 </issuerMetadata>
23 </message>
24 </security>
25 </binding>
26 </wsFederationHttpBinding>
27 </bindings>
29 <services>
30 <service name="Microsoft.ServiceModel.Samples.CalculatorService"
31 behaviorConfiguration ="ServiceBehaviour" >
32 <host>
33 <!-- configure base address provided by host -->
34 <baseAddresses>
35 <add baseAddress ="http://localhost:8010/fedservice/" />
36 </baseAddresses>
37 </host>
38 <!-- use base address provided by host, provide one endpoint -->
39 <endpoint address ="calc"
40 binding ="wsFederationHttpBinding"
41 bindingConfiguration ="ServiceFed"
42 contract ="Microsoft.ServiceModel.Samples.ICalculator"/>
43 </service>
44 </services>
46 <behaviors>
47 <serviceBehaviors>
48 <behavior name ="ServiceBehaviour" >
49 <serviceDebug includeExceptionDetailInFaults ="true"/>
50 <!--
51 The serviceMetadata behavior allows one to enable metadata (e.g. WSDL, Policy) publishing.
52 This configuration enables publishing of such data over HTTP GET.
53 -->
54 <serviceMetadata httpGetEnabled ="true"/>
55 <serviceCredentials>
56 <!--
57 The serviceCredentials behavior allows one to define validation parameters for issued tokens.
58 This configuration adds the "STS" certificate to a list of known certificates. This
59 means that the service will accept tokens issued by "STS".
60 -->
61 <issuedTokenAuthentication>
62 <knownCertificates>
63 <add storeLocation ="LocalMachine"
64 storeName="TrustedPeople"
65 x509FindType="FindBySubjectDistinguishedName"
66 findValue="CN=STS" />
67 </knownCertificates>
68 </issuedTokenAuthentication>
69 <!--
70 The serviceCredentials behavior allows one to define a service certificate.
71 A service certificate is used by a client to authenticate the service and provide message protection.
72 This configuration references the "localhost" certificate installed during setup of the sample.
73 -->
74 <serviceCertificate storeLocation ="LocalMachine"
75 storeName ="My"
76 x509FindType ="FindBySubjectDistinguishedName"
77 findValue ="CN=localhost"/>
78 </serviceCredentials>
79 </behavior>
80 </serviceBehaviors>
81 </behaviors>
83 </system.serviceModel>
85 </configuration>