EnhancedWebReferences: SetWebReferenceCredentials

EnhancedWebReferences: SetWebReferenceCredentials

I'm trying to consume a WS that requires simple authentication. I'm using the SetWebReferenceCredentials from the EnhancedWebReferences. This is my configuration:

But when I try to consume it it keeps sending the message that the service requires authentication. What I''m missing here?

Thanks for your help.

Hi Hector,

It looks OK.
The SetWebRefenceCredentials sets the username and password as basic authenticion of the service. Is that what you consider "simple authentication"?

Or does is it expecting a authentication soap header?

João Rosado

Thanks João, yes, the authentication credentials are expected in the Soap Header.


Hector -

That isn't how this call works, it is used for the "Basic" HTTP authentication.

You need to use the AddSoapHeader call to do this.