Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- WCF
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <system.serviceModel>
- <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
- <protocolMapping>
- <add scheme="http" binding="wsHttpBinding" />
- </protocolMapping>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Behaviors
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <behaviors>
- <serviceBehaviors>
- <!-- Behavior for the service with certificate-based authentication -->
- <behavior name="SecureFooBehavior">
- <!--
- To avoid disclosing metadata information, set the value below to false and
- remove the metadata endpoint above before deployment
- -->
- <serviceMetadata httpGetEnabled="true" />
- <!--
- To receive exception details in faults for debugging purposes, set the value
- below to true. Set to false before deployment to avoid disclosing
- exception information
- -->
- <serviceDebug includeExceptionDetailInFaults="true" />
- <!--
- Specifies the credential to be used in authenticating the service and
- the client credential validation-related settings.
- -->
- <serviceCredentials>
- <!--
- Specifies an X.509 certificate that will be used to authenticate
- the service to clients using Message security mode.
- -->
- <serviceCertificate
- storeLocation="LocalMachine"
- storeName="My"
- x509FindType="FindByThumbprint"
- findValue="01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14"
- />
- <!--
- Specifies the certificate to be used when the client certificate is
- available out-of-band. This element also specifies client certificate
- validation settings.
- -->
- <clientCertificate>
- <authentication certificateValidationMode="None" />
- <!-- PeerOrChainTrust -->
- </clientCertificate>
- </serviceCredentials>
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Bindings
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <bindings>
- <wsHttpBinding>
- <binding name="FooBinding">
- <security>
- <message clientCredentialType="Certificate" />
- </security>
- </binding>
- </wsHttpBinding>
- </bindings>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Services
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <services>
- <service
- name="Company.Foo.Service.FooService"
- behaviorConfiguration="SecureFooBehavior"
- >
- <!--
- This endpoint is exposed at the base address provided by host
- -->
- <endpoint
- contract="Company.Foo.Service.IFooService"
- binding="wsHttpBinding"
- bindingConfiguration="FooBinding"
- />
- <!--
- The Metadata Exchange (mex) endpoint is used to query informations about
- the services classes, structures and methods. Without this, Visual Studio
- can not auto-discover the interface exposed by a web service.
- -->
- <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
- </service>
- </services>
- </system.serviceModel>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement