我的服务具有以下配置,运行良好。当我需要使用 TransportWithMessageCredential 安全模式更改 wsHttpBinding 中 MaxClockSkew 的值时,就会出现问题。
如何更改此配置中的 MaxClockSkew 值?
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="HttpsService_wsHttpBinding" closeTimeout="01:10:00"
openTimeout="01:10:00" receiveTimeout="Infinite" sendTimeout="Infinite"
maxBufferPoolSize="999999999" maxReceivedMessageSize="99999999">
<readerQuotas maxDepth="999999999" maxStringContentLength="999999999"
maxArrayLength="999999999" maxBytesPerRead="999999999" maxNameTableCharCount="999999999" />
<reliableSession inactivityTimeout="Infinite" enabled="true" />
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="WcfServiceApp.Service1">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="HttpsService_wsHttpBinding"
name="wsHttpEndPoint" contract="CommonTypes.IService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="CommonTypes.CustomValidator, CommonTypes" />
</serviceCredentials>
<dataContractSerializer maxItemsInObjectGraph="2147483646" />
<bufferedReceive maxPendingMessagesPerChannel="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<diagnostics wmiProviderEnabled="true">
<messageLogging
logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="3000"
/>
</diagnostics>
</system.serviceModel>