Using a web service with basic authentication

In the past, I was able to add a web service through Visual Studio by adding a service reference.

Now I need to use WSDL which uses Basic Authentication. When I try to add a new service link, I get the errorThe HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'BASIC realm="owsm"'. The remote server returned an error: (401) Unauthorized. If the service is defined in the current solution, try building the solution and adding the service reference again.

Where can I change authentication or add credentials to create a new service help?

+3


source to share


1 answer


I think I know what you are trying to do. First right click on your solution in the solution explorer and click on Add Service Link

enter image description here

Then click on "Advanced"

enter image description here



Then click "Add Web Link"

enter image description here

This should do it.

-1


source







All Articles