I am trying to install maxClockSkew from my WCF service for something over 5 minutes (default), but I am not succeeding. It seems like something is wrong when I want to set it together with authenticationMode = "UserNameOverTransport". I need this because my server is running under https, and I will authenticate the user using my own authentication provider. There are no errors when initializing the server, but the value does not change from 5 minutes (00:05:00) ... And I always get an annoying message from the client side, saying
The security timestamp is invalid because the time it was created ('2011-06-24T15: 31: 22.338Z') in the future. The current time is "2011-06-24T15: 21: 30.923Z" and the allowed clock switching is "00: 05: 00".
Here you can see the entire service configuration file:
<?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>
What am I missing? Has anyone encountered this problem? I did not find many people faced with this situation.
Thanks in advance
Pedro
Pedro source share