Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <services>
- <service name="SampleServiceConsoleHost.HelloWorldService" behaviorConfiguration="SampleService">
- <endpoint address="" binding="customBinding" bindingConfiguration="SampleService" contract="SampleServiceConsoleHost.IHelloWorld"/>
- <host>
- <baseAddresses>
- <add baseAddress="net.tcp://localhost:9000/servicemodelsamples/service"/>
- </baseAddresses>
- </host>
- </service>
- </services>
- <bindings>
- <netTcpBinding>
- <binding name="TransportSecuredBinding">
- <security mode="Transport">
- <transport clientCredentialType="Windows" />
- </security>
- </binding>
- </netTcpBinding>
- <customBinding>
- <binding name="AnonBinding">
- <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
- <secureConversationBootstrap
- authenticationMode="AnonymousForCertificate"/>
- </security>
- <binaryMessageEncoding/>
- <tcpTransport />
- </binding>
- <binding name="SampleService">
- <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
- <secureConversationBootstrap authenticationMode="IssuedToken">
- <issuedTokenParameters tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
- <issuer address="net.tcp://localhost:8000/sts" bindingConfiguration="TransportSecuredBinding" binding="netTcpBinding">
- <identity>
- <dns value="STSAuthority"/>
- </identity>
- </issuer>
- </issuedTokenParameters>
- </secureConversationBootstrap>
- </security>
- <binaryMessageEncoding/>
- <tcpTransport />
- </binding>
- </customBinding>
- </bindings>
- <behaviors>
- <serviceBehaviors>
- <behavior name="SampleService" returnUnknownExceptionsAsFaults="false">
- <serviceCredentials>
- <issuedTokenAuthentication allowUntrustedRsaIssuers="true" revocationMode="NoCheck" certificateValidationMode="None">
- <knownCertificates>
- <add storeLocation="LocalMachine" storeName="My" findValue="CN=STSAuthority" x509FindType="FindBySubjectDistinguishedName"/>
- <add storeLocation="LocalMachine" storeName="My" findValue="CN=SampleService" x509FindType="FindBySubjectDistinguishedName"/>
- </knownCertificates>
- </issuedTokenAuthentication>
- </serviceCredentials>
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <client>
- <!--<endpoint name="clientendpoint" address="net.tcp://localhost:9000/servicemodelsamples/service"
- binding="customBinding"
- contract="IHelloWorld"
- behaviorConfiguration="ServiceBehavior"
- bindingConfiguration="ServiceBinding">
- </endpoint> -->
- <endpoint name="clientendpoint" address="net.tcp://localhost:9000/servicemodelsamples/service"
- binding="customBinding"
- contract="IHelloWorld"
- behaviorConfiguration="ServiceBehavior"
- bindingConfiguration="ServiceBinding"
- >
- </endpoint>
- </client>
- <bindings>
- <netTcpBinding>
- <binding name="TransportSecuredBinding">
- <security mode="Transport">
- <transport clientCredentialType="Windows" />
- </security>
- </binding>
- </netTcpBinding>
- <customBinding>
- <binding name="AnonBinding">
- <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
- <secureConversationBootstrap
- authenticationMode="AnonymousForCertificate"/>
- </security>
- <binaryMessageEncoding/>
- <tcpTransport />
- </binding>
- <binding name="ServiceBinding">
- <security authenticationMode="SecureConversation">
- <secureConversationBootstrap authenticationMode="IssuedToken">
- <issuedTokenParameters tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
- <issuer address="net.tcp://localhost:8000/sts" bindingConfiguration="TransportSecuredBinding" binding="netTcpBinding">
- <identity>
- <dns value="STSAuthority"/>
- </identity>
- </issuer>
- </issuedTokenParameters>
- </secureConversationBootstrap>
- </security>
- <binaryMessageEncoding/>
- <tcpTransport />
- </binding>
- </customBinding>
- </bindings>
- <behaviors>
- <endpointBehaviors>
- <behavior name="ServiceBehavior">
- <clientCredentials>
- <issuedToken>
- <localIssuer address="net.tcp://localhost:8000/sts" bindingConfiguration="TransportSecuredBinding" binding="netTcpBinding">
- <identity>
- <dns value="STSAuthority"/>
- </identity>
- </localIssuer>
- </issuedToken>
- <!--clientCertificate findValue="CN=SampleClient" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectDistinguishedName"/-->
- <serviceCertificate>
- <defaultCertificate findValue="CN=STSAuthority" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectDistinguishedName"/>
- <authentication revocationMode="NoCheck" certificateValidationMode="None"></authentication>
- </serviceCertificate>
- </clientCredentials>
- </behavior>
- </endpointBehaviors>
- </behaviors>
- <services >
- <service behaviorConfiguration="ServiceBehavior"
- name="Samples.Security.STS.SecurityTokenService">
- <!-- Mutual X509 Endpoint -->
- <!--endpoint
- binding="netTcpBinding"
- address=""
- bindingConfiguration="TransportSecuredBinding"
- contract="Samples.Security.STS.ISecurityTokenService">
- </endpoint-->
- <endpoint
- binding="netTcpBinding"
- address=""
- bindingConfiguration="TransportSecuredBinding"
- contract="Samples.Security.STS.ISecurityTokenService">
- </endpoint>
- <host>
- <baseAddresses>
- <add baseAddress ="net.tcp://localhost:8000/sts/" />
- </baseAddresses>
- </host>
- </service>
- </services>
- <bindings>
- <netTcpBinding>
- <binding name="TransportSecuredBinding">
- <security mode="Transport">
- <transport clientCredentialType="Windows" />
- </security>
- </binding>
- </netTcpBinding>
- <customBinding>
- <binding name="AnonBinding">
- <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
- <secureConversationBootstrap
- authenticationMode="AnonymousForCertificate"/>
- </security>
- <binaryMessageEncoding/>
- <tcpTransport />
- </binding>
- </customBinding>
- </bindings>
- <!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->
- <behaviors >
- <serviceBehaviors>
- <behavior name="ServiceBehavior">
- <serviceCredentials>
- <serviceCertificate findValue="CN=STSAuthority" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectDistinguishedName"/>
- <!-- Only for Mutual Certificate -->
- <clientCertificate>
- <authentication revocationMode="NoCheck"/>
- </clientCertificate>
- </serviceCredentials>
- <serviceDebug includeExceptionDetailInFaults="true"/>
- </behavior>
- </serviceBehaviors>
- </behaviors>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement