Wcf fault Exception + An error occurred when verifying security for.. + maxClockSkew

Discussion in 'ASP.NET WebServices' started by vmanos2, Dec 2, 2009.

  1. I deployed a wcf service to my discountasp account and some times when I try to connect and authenticate I am getting back a fault Exception (An error occurred when verifying security for the message).

    Searching over google (http://intrepiddeveloper.wordpress....ntication-failure-timestamp-clock-skew-issue/) I come to the conclusion that is something about different time zones and an enforced security of the wsHttpBinding to protect you for some time attracts. I follow online instructions (http://msdn.microsoft.com/en-us/library/aa738468.aspx) but the problem still exists.

    I am from Greece and my time zone is GMT+2

    My customBinding with maxClockSkew option (from online instructions) is following:

    <customBinding>
    <binding name="wsHttpBindingWithMaxClockSkew">
    <transactionFlow transactionProtocol="WSAtomicTransactionOctober2004" />
    <security defaultAlgorithmSuite="Default" authenticationMode="SecureConversation"
    requireDerivedKeys="true" securityHeaderLayout="Strict" includeTimestamp="true"
    keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncryptAndEncryptSignature"
    messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
    requireSecurityContextCancellation="true" requireSignatureConfirmation="false">
    <localClientSettings cacheCookies="true" detectReplays="true"
    replayCacheSize="900000" maxClockSkew="22:00:00" maxCookieCachingTime="Infinite"
    replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
    sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="false"
    timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
    <localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00"
    maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="22:00:00"
    negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
    sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
    reconnectTransportOnFailure="false" maxPendingSessions="128"
    maxCachedCookies="1000" timestampValidityDuration="00:05:00" />
    <secureConversationBootstrap defaultAlgorithmSuite="Default"
    authenticationMode="UserNameForCertificate" requireDerivedKeys="true"
    securityHeaderLayout="Strict" includeTimestamp="true" keyEntropyMode="CombinedEntropy"
    messageProtectionOrder="SignBeforeEncryptAndEncryptSignature"
    messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
    requireSignatureConfirmation="false">
    <localClientSettings cacheCookies="true" detectReplays="true"
    replayCacheSize="900000" maxClockSkew="22:00:00" maxCookieCachingTime="Infinite"
    replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
    sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true"
    timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
    <localServiceSettings detectReplays="true" issuedCookieLifetime="00:15:00"
    maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="22:00:00"
    negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
    sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
    reconnectTransportOnFailure="true" maxPendingSessions="128"
    maxCachedCookies="1000" timestampValidityDuration="00:05:00" />
    </secureConversationBootstrap>
    </security>
    <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
    messageVersion="Default" writeEncoding="utf-8">
    <readerQuotas maxDepth="64" maxStringContentLength="2147483647"
    maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
    </textMessageEncoding>
    <httpTransport manualAddressing="false" maxBufferPoolSize="2147483647"
    maxReceivedMessageSize="2147483647" allowCookies="false" authenticationScheme="Anonymous"
    bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
    keepAliveEnabled="true" maxBufferSize="2147483647" proxyAuthenticationScheme="Anonymous"
    realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
    useDefaultWebProxy="true">
    </httpTransport>
    </binding>
    </customBinding>



    If anybody can help/assist me in any possible way to overcome my exception..

    Thanks a lot for your time. :)
     

Share This Page