0

WCF C# console client to Java web service call with customBinding. Thanks for your help.

The binding is as follows:


It gets the following exception:

InnerException: 
       HResult=-2146232000
       LineNumber=0
       LinePosition=0
       Message=Cannot read the token from the 'SignatureConfirmation' element with the 'http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd' namespace for BinarySecretSecurityToken, with a '' ValueType. If this element is expected to be valid, ensure that security is configured to consume tokens with the name, namespace and value type specified.
       Source=System.ServiceModel
       StackTrace:
            at System.ServiceModel.Security.WSSecurityTokenSerializer.ReadTokenCore(XmlReader reader, SecurityTokenResolver tokenResolver)
            at System.ServiceModel.Security.ReceiveSecurityHeader.ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver, IList`1 allowedTokenAuthenticators, SecurityTokenAuthenticator& usedTokenAuthenticator)
            at System.ServiceModel.Security.ReceiveSecurityHeader.ReadToken(XmlDictionaryReader reader, Int32 position, Byte[] decryptedBuffer, SecurityToken encryptionToken, String idInEncryptedForm, TimeSpan timeout)
            at System.ServiceModel.Security.ReceiveSecurityHeader.ExecuteReadingPass(XmlDictionaryReader reader)
            at System.ServiceModel.Security.LaxModeSecurityHeaderElementInferenceEngine.ExecuteProcessingPasses(ReceiveSecurityHeader securityHeader, XmlDictionaryReader reader)
            at System.ServiceModel.Security.ReceiveSecurityHeader.Process(TimeSpan timeout, ChannelBinding channelBinding, ExtendedProtectionPolicy extendedProtectionPolicy)
            at System.ServiceModel.Security.MessageSecurityProtocol.ProcessSecurityHeader(ReceiveSecurityHeader securityHeader, Message& message, SecurityToken requiredSigningToken, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
            at System.ServiceModel.Security.AsymmetricSecurityProtocol.VerifyIncomingMessageCore(Message& message, String actor, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
            at System.ServiceModel.Security.MessageSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
       InnerException:

Custom binding:

<customBinding> <binding name="cb1"> <security defaultAlgorithmSuite="Basic256Rsa15" allowSerializedSigningTokenOnReply="true" authenticationMode="MutualCertificate" requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="true" keyEntropyMode="CombinedEntropy"
messageProtectionOrder="SignBeforeEncrypt" protectTokens="true" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" requireSecurityContextCancellation="false" requireSignatureConfirmation="false" canRenewSecurityContextToken="true">
<issuedTokenParameters keySize="256" keyType="AsymmetricKey" tokenType="#X509v3" useStrTransform="true" /> </security> <textMessageEncoding messageVersion="Soap12WSAddressingAugust2004" /> <httpsTransport maxReceivedMessageSize="65536000" authenticationScheme="Anonymous" maxBufferSize="65536000" requireClientCertificate="true" /> </binding> </customBinding>
usermc
  • 1
  • 1
  • You should show some code. –  Aug 16 '18 at 21:00
  • Thanks. The site doesn't allow me to post my customBindng. Let me try again. – usermc Aug 16 '18 at 21:27
  • messageProtectionOrder="SignBeforeEncrypt" protectTokens="true" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" requireSecurityContextCancellation="false" requireSignatureConfirmation="false" canRenewSecurityContextToken="true"> – usermc Aug 16 '18 at 21:29
  • All this stuff should be in the question, which you can [edit]. It is impossible to read text like this in comments, and comments can be deleted. –  Aug 17 '18 at 14:05
  • Thanks. Actually, the customBinding is in the question. However, once it’s saved. It doesn’t show. That’s why I have to add it to comments. – usermc Aug 19 '18 at 01:29

0 Answers0