以编程方式设置maxClockSkew

时间:2018-10-25 10:46:11

标签: .net wcf binding

我正在尝试以编程方式成功实现此客户端/绑定,我可以或多或少地实现绑定正确性,但是无法以编程方式设置maxClockSkew。 感谢您的支持!

    <system.serviceModel>
        <bindings>
            <customBinding>
                <binding name="CustomBinding_IIService" closeTimeout="00:25:00" openTimeout="00:20:00" receiveTimeout="00:10:00" sendTimeout="00:25:00">
                    <security defaultAlgorithmSuite="Basic256Sha256Rsa15" authenticationMode="MutualCertificateDuplex" requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="true" messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" requireSignatureConfirmation="true" allowSerializedSigningTokenOnReply="true" enableUnsecuredResponse="true">
                      <localClientSettings maxClockSkew="00:07:00" detectReplays="true" />
                      <localServiceSettings maxClockSkew="00:07:00" detectReplays="true" />
                      <secureConversationBootstrap>
                        <localClientSettings maxClockSkew="00:30:00" />
                        <localServiceSettings maxClockSkew="00:30:00" />
                      </secureConversationBootstrap>
                    </security>
                    <textMessageEncoding />
                    <httpsTransport />
                </binding>
            </customBinding>
        </bindings>
        <client>
            <endpoint address="https://mydemo/service.svc" binding="customBinding" bindingConfiguration="CustomBinding_IIService" contract="IIService" name="CustomBinding_IIService">
                <identity>
                    <certificate encodedValue="blablablacertificate" />
                </identity>
            </endpoint>
        </client>
</system.serviceModel>

0 个答案:

没有答案