The HTML document does not contain Web service discovery information
We have a simple SOAP based Web service deployed in Azure. We have added authentication feature, to use Microsoft as identity provider. While importing the WSDL as service reference in .NET Framework C# console application, we get the following error:-
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'https://testsoapws.azurewebsites.net/WebS1.asmx?WSDL'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Bearer realm="testsoapws.azurewebsites.net" authorization_uri="https://login.microsoftonline.com/3afdd2b8-3004-4b5f-9ca6-dce3d1f9d1c5/oauth2/v2.0/authorize" resource_id="c4b8fbd3-8848-473d-8935-76a038da52b0"'.
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.
What is missing? We are exploring accessing SOAP based Web service with authentication in a standalone program, which later we will integrate as a feature in our product. The programmatic steps to consume such a service is what we are interested in.