I need to request basic authentication from the web service by entering the username and password in the request header. My client is written in VB.NET Visual Basic Express Edition 2010. I added a web service to the service links. He automatically created the appropriate classes for me. I wrote the following very simple code:
Dim imageService As AverittWebServices.SendWebImageClient = New AverittWebServices.SendWebImageClient("SendWebImagePort")
Dim imageResult As String
imageResult = imageService.getAvailableImages("")
DisplayLabel.Text = imageResult
I get a response from a service that indicates that I need to have a username and password in the SOAP header. The problem is that I cannot find a way to insert the username and password in the header. I have them, but they have no obvious way to use them.
source
share