C# - When consuming a web service using SOAP protocol how to set the WS-A address header before calling the service method (Async)?

Pedro Alves 1 Reputation point
2021-03-24T19:23:47.97+00:00

I'm consuming a web service that uses SOAP protocol, I created a new .net framework console app and added the service, all good.
Now I need to use WS-Adressing for making asynchronous calls.

How to correctly setup my project (app.config, references?) so that it uses wsHttpBinding?

When instantiating the client and before calling the wanted method, how can I set the header with the following info: MessageID and ReplyTo ?

Thanks in advance.

Developer technologies | C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.