Wednesday, June 28, 2017

Common error on securityConfirmation when invoking secured service with .NET client

When invoking a secured SOAP service over a .NET client a very common error as below can be seen.

<Exception> <ExceptionType>System.ServiceModel.Security.MessageSecurityException</ExceptionType> <Message>Signature confirmation is not expected in the security header.</Message> <StackTrace>
 
This is because the secured policy used for the service is sending a SignatureConfirmation header in its security header.

If you secured the service over WSO2 ESB secured proxy , then you only need to remove below tag in blue from your WS-policy for service.

 
 
             <sp:Wss11>
                <wsp:Policy>
                    <sp:MustSupportRefKeyIdentifier/>
                    <sp:MustSupportRefIssuerSerial/>
                    <sp:MustSupportRefThumbprint/>
                    <sp:MustSupportRefEncryptedKey/>
                    <sp:RequireSignatureConfirmation/>
                </wsp:Policy>
            </sp:Wss11> 


No comments:

Post a Comment