Wsdoallreceiver: Incoming Message Does Not Contain Required Security Header

I have java service which communicates over https. I want to connect to this service from C#.

I am getting this exception:

System.ServiceModel.FaultException: WSDoAllReceiver: Incoming message does not contain required Security header.

Someone knows what is wrong?

C# Code:

EndpointAddress address = new EndpointAddress(
                    new Uri(""),
                        EndpointIdentity.CreateDnsIdentity("JavaStore"),
                        new AddressHeaderCollection()
                );

BasicHttpBinding binding = new BasicHttpBinding();
binding.Security.Mode = BasicHttpSecurityMode.Transport;

var client = new ReharB2BService.B2BServicePortTypeClient(binding, address);;

client.Open();
client.getAllItems();

1 Answer

Check this post on how to include security headers in WCF calls (the example is against a java hosted web service):

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest