Is there a way to add an authorization header to a call to an old asmx soap service?

16 Views Asked by At

I have an old C# project where there is a web reference to an .asmx soap web service. Visual Studio has generated a service class from the endpoints WSDL and so I can instantiate the service and call methods through that instance.

like so:

var response = service.method1(arg1, arg2);

PS. The web reference was created by going through: References -> Add Service Reference -> Advanced -> Add Web Reference.

But how can I add a header to this call?

0

There are 0 best solutions below