我是创建 WCF Web 服务的新手,我正在尝试弄清楚如何创建符合 WSS:X509 Token Profile 1.0 的 WCF 服务。有很多关于如何进行客户端配置的帖子,但是关于服务器配置的帖子不多。
该项目最初是作为 WSDL 优先生成的服务,因此我无法更改客户端如何向我发送数据的任何内容,并且我需要使服务符合他们发送的数据。
我已经为这个服务创建了一个自定义端点,但是这就是我卡住的地方。我确定我缺少一些小细节以使其符合以下 pdf:
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0.pdf
<behavior name="Something.ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="None" />
<certificate findValue="ClientCertificate"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindBySubjectName" />
</clientCertificate>
<serviceCertificate findValue="OurCertificate"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindBySubjectName"/>
</serviceCredentials>
<serviceSecurityAudit auditLogLocation="Application"
serviceAuthorizationAuditLevel="Failure"
messageAuthenticationAuditLevel="Failure"
suppressAuditFailure="true" />
</behavior>
</serviceBehaviors>
<service behaviorConfiguration="Something.ServiceName"
name="Something.ServiceName">
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MetaDataEndPoint" contract="IMetadataExchange" />
<endpoint address="" binding="customBinding" bindingConfiguration="CustomBinding0" name="customBindingEndPoint" contract="Something.IServiceName" >
</endpoint>
<binding name="CustomBinding0">
<textMessageEncoding messageVersion="Soap12" />
<security authenticationMode="MutualCertificate" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11" />
<httpTransport />
</binding>
非常感谢任何帮助/评论。