WSDoAllReceiver: Incoming message does not contain the required security header.

I have a java service that communicates over https. I want to connect to this service with C #.

I get this exception:

System.ServiceModel.FaultException: WSDoAllReceiver: The incoming message does not contain the required security header.

Does anyone know what is wrong?

C # code:

EndpointAddress address = new EndpointAddress(
                    new Uri("https://JavaStore:8443/JavaStore/services/B2BService"),
                        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();
+3
source share
1 answer

Mark this post on how to include security headers in WCF calls (example applies to a web service hosted in java): http://isyourcode.blogspot.com/2010/05/using-oasis-username-token-profile- in.html

+1
source

Source: https://habr.com/ru/post/1769304/


All Articles