gpt4 book ai didi

wcf-binding - maxClockSkew 不超过 5 分钟?!(即使我明确设置)

转载 作者:行者123 更新时间:2023-12-01 06:45:02 24 4
gpt4 key购买 nike

我正在尝试将我的 WCF 服务的 maxClockSkew 设置为高于 5 分钟(默认),但我没有成功。当我想将它与 authenticationMode="UserNameOverTransport"一起设置时,它看起来有问题。我需要这个,因为我的服务器在 https 下运行,我将使用自定义身份验证提供程序对用户进行身份验证。服务器初始化没有错误,但值从 5 分钟(00:05:00)开始没有变化......而且我总是从客户端收到烦人的消息说

The security timestamp is invalid because its creation time ('2011-06-24T15:31:22.338Z') is in the future. Current time is '2011-06-24T15:21:30.923Z' and allowed clock skew is '00:05:00'.



在这里你可以看到我的整个服务配置文件:
<?xml version="1.0"?> <configuration>
<system.web>
<compilation debug="true"/>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
</serviceHostingEnvironment>
<services>
<service name="MYSERVICE">
<endpoint address="" binding="customBinding" bindingConfiguration="HTTP" contract="MYCONTRACT">
<identity>
<dns value="https://localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="https://localhost/service"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="False" httpsGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="False"/>
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="CUSTOMServiceCredentialsValidator, ASSEMBLY" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="HTTP">
<transactionFlow />
<textMessageEncoding>
<readerQuotas maxStringContentLength="2147483647"/>
</textMessageEncoding>
<security authenticationMode="SecureConversation">
<localClientSettings maxClockSkew="00:10:00"/>
<localServiceSettings maxClockSkew="00:10:00"/>
<secureConversationBootstrap authenticationMode="UserNameOverTransport">
<localClientSettings maxClockSkew="00:10:00"/>
<localServiceSettings maxClockSkew="00:10:00"/>
</secureConversationBootstrap>
</security>
<httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"/>
</binding>
</customBinding>
</bindings>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

我错过了什么?有人遇到过这个问题吗?我没有发现很多人面临这种​​情况。

提前致谢

佩德罗

最佳答案

您需要明确设置一个新绑定(bind):

http://msdn.microsoft.com/en-us/library/aa738468.aspx

高温高压

关于wcf-binding - maxClockSkew 不超过 5 分钟?!(即使我明确设置),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6470206/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com