Click here to Skip to main content
11,492,907 members (57,027 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: WCF certificate
I'm newer at creating WCF web services and I'm trying to figure out how to create a WCF service that conforms to the WSS:X509 Token Profile 1.0. There are many posts about how to do the client configuration however, not much about server configurations.
This project began as a WSDL-first generated service, so I am unable to change anything about how the client sends data to me, and I'm required to make the service conform to the data they send.
I've gone and created a custom endpoint for this service, however this is where i'm stuck. I'm sure theres just some small detail i'm missing to make it conform to the pdf below:

<behavior name="Something.ServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
          <authentication certificateValidationMode="None" />
          <certificate findValue="ClientCertificate" 
                       x509FindType="FindBySubjectName" />
        <serviceCertificate findValue="OurCertificate" 
      <serviceSecurityAudit auditLogLocation="Application"
                            suppressAuditFailure="true" />
  <service behaviorConfiguration="Something.ServiceName"
    <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MetaDataEndPoint" contract="IMetadataExchange" />
    <endpoint address="" binding="customBinding" bindingConfiguration="CustomBinding0" name="customBindingEndPoint" contract="Something.IServiceName" >
    <binding name="CustomBinding0">
      <textMessageEncoding messageVersion="Soap12" />
      <security authenticationMode="MutualCertificate" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11" />
      <httpTransport />
Any Help/Comments is greatly appreciated.
Posted 28-Mar-13 8:55am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Well, the above was basically correct. I just needed to tweak how it found the certificate (by thumbprint instead of by name) and it worked perfectly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 419
1 Maciej Los 286
2 F-ES Sitecore 224
3 KarstenK 210
4 CPallini 208
0 Sergey Alexandrovich Kryukov 10,132
1 OriginalGriff 8,630
2 Sascha Lefèvre 3,624
3 Maciej Los 3,392
4 Richard Deeming 2,500

Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100