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.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,239 questions
{count} votes