none
Cannot resolve KeyInfo for verifying signature: KeyInfo 'SecurityKeyIdentifier RRS feed

  • Question

  • The application connects to the WCF service through a certificate, but as soon as I try to call one or another method, an exception is thrown:

    What does this mean and what should be corrected?

    Cannot resolve KeyInfo for verifying signature: KeyInfo 'SecurityKeyIdentifier
        (
        IsReadOnly = False,
        Count = 1,
        Clause[0] = X509SubjectKeyIdentifierClause(SKI = 0xE3190644871D4F41810E738647F037F0D8C5E12A)
        )
    ', available tokens 'SecurityTokenResolver
        (
        TokenCount = 1,
        TokenEntry[0] = (AllowedReferenceStyle=External, Token=System.IdentityModel.Tokens.X509SecurityToken, Parameters=System.ServiceModel.Security.Tokens.X509SecurityTokenParameters:
    InclusionMode: Never
    ReferenceStyle: Internal
    RequireDerivedKeys: False
    X509ReferenceStyle: Any)
        )
    '.

    app.config

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <startup> 
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
        </startup>
        <system.serviceModel>
            <bindings>
                <customBinding>
                    <binding name="BasicHttpBinding_IMPayServiceProvider">
                        <security defaultAlgorithmSuite="Default" authenticationMode="MutualCertificate"
                            requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="true"
                            messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
                            requireSignatureConfirmation="false">
                            <localClientSettings detectReplays="true" />
                            <localServiceSettings detectReplays="true" />
                        </security>
                        <textMessageEncoding messageVersion="Soap11" />
                      <httpsTransport  maxReceivedMessageSize="1048576"/>
                    </binding>
                </customBinding>
            </bindings>
          <behaviors>
            <endpointBehaviors>
              <behavior name="Behavior_IMPayServiceProvider">
                <clientCredentials>
                  <clientCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" findValue="blabla"/>
                  <serviceCertificate>
                    <defaultCertificate storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectName" findValue="blabla"/>
                  </serviceCertificate>
                </clientCredentials>
              </behavior>
            </endpointBehaviors>
          </behaviors>
            <client>
                <endpoint address="blabla"
                    binding="customBinding" bindingConfiguration="BasicHttpBinding_IMPayServiceProvider"
                    contract="MPayServiceProvider.IMPayServiceProvider" name="BasicHttpBinding_IMPayServiceProvider" behaviorConfiguration="Behavior_IMPayServiceProvider">
                  <identity>
                    <dns value="blabla" />
                  </identity>
                </endpoint>
            </client>
        </system.serviceModel>
    </configuration>

    Friday, February 22, 2019 1:34 PM

All replies

  • Hi Magals,

    I had never encountered this issue since the server/client certificate is not well configured. How do you ensure that the certificate is configured correctly? which way do you use to host the service and bind the certificate? I try to reproduce the issue with your configuration if you could post more details about your questions.
    Look forward to your reply.
    Best Regards
    Abraham 

    Monday, February 25, 2019 8:00 AM
    Moderator