none
No signature in the WS-Security message for the configured soap actor RRS feed

  • Question

  • Hello,

    I'm a newbie @ WCF and have hit a wall, I set up my binding as below as per below after googling for a while

      SecurityBindingElement security = new TransportSecurityBindingElement();
                    X509SecurityTokenParameters item = new X509SecurityTokenParameters(X509KeyIdentifierClauseType.Any, SecurityTokenInclusionMode.AlwaysToRecipient);
                    security.EndpointSupportingTokenParameters.SignedEncrypted.Add(item);
                    security.IncludeTimestamp = false;
                    security.EnableUnsecuredResponse = true;
                    security.MessageSecurityVersion = MessageSecurityVersion.WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10;
                    TextMessageEncodingBindingElement encoding = new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8);
                    HttpsTransportBindingElement transport = new HttpsTransportBindingElement();
                    transport.RequireClientCertificate = true;
                    System.ServiceModel.Channels.Binding currentBinding = new CustomBinding(security, encoding, transport);
    

    but i get "No signature in the WS-Security message for the configured soap actor"

     

    This i changed from the below code which i get "Signing without primary signature requires timestamp."

        WSHttpBinding b = new WSHttpBinding();
                    // Set the security mode to Message
                    b.Security.Mode = SecurityMode.TransportWithMessageCredential;
                     b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;
                   
                    // Set NegotiateServiceCredential to true
                    b.Security.Message.NegotiateServiceCredential = false;
                    b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic128;
                    b.Security.Message.EstablishSecurityContext = false;
                    b.ReaderQuotas.MaxStringContentLength = int.MaxValue;
                    b.ReceiveTimeout = TimeSpan.MaxValue;
                   CustomBinding currentBinding = new CustomBinding(b);
                   var clientSbe = currentBinding.Elements.Find<TransportSecurityBindingElement>();
                    var encoding = currentBinding.Elements.Find<TextMessageEncodingBindingElement>();
                    var transport = currentBinding.Elements.Find<HttpsTransportBindingElement>();
                    X509SecurityTokenParameters item =  new X509SecurityTokenParameters(X509KeyIdentifierClauseType.Any, SecurityTokenInclusionMode.AlwaysToRecipient);
                              
                    clientSbe.EndpointSupportingTokenParameters.SignedEncrypted.Add(item);
                    clientSbe.SetKeyDerivation(false);
                    clientSbe.IncludeTimestamp = false;
                   clientSbe.EnableUnsecuredResponse = true;
                   clientSbe.MessageSecurityVersion = MessageSecurityVersion.WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10;
                    transport.RequireClientCertificate = true;
    

    Please note that as per the client instructions i turned off the timestamp because the server returns an error when the timestamp is present, causing the WCF client to return a "NO MESSAGE AVAILABLE.  WAIT TIME EXCEEDED"  Error.. If someone could point me in the right direction, i have pulled out all my hair..

     


    me
    Friday, October 14, 2011 3:44 PM