开发者

maxClockSkew does not get higher than 5 minutes?!(Even if I set it explicitly)

I'm trying to set the maxClockSkew of my WCF Service to something higher than 5 minutes(default)but I'm not succeding. It looks that there's something wrong when I want to set it together with the authenticationMode="UserNameOverTransport". I need this because my server is running under https and I will authenticate the user using a custom authentication Provider. There's no errors on the server initialization, but the value does not change from 5 minutes(00:05:00)... And I always get the annoying message from the client side saying

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'.

Here you can see my whole Service config file:

<?xml version="1.0"?> <configuration>
<system.web>
    <compilation debug="true"/>
</system.web>
<system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true">
 开发者_如何学JAVA   </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>

What Am I missing? Does anyone faced this issue? I did not found many people facing this situation.

Thanks In Advance

Pedro


You need to set up explicitly a new binding:

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

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜