I'm trying to access a soap webservice i .net Core 3.1 I did add the service via Microsoft WCF Web Service Reference Provider (I typed username and password to get access.)
But I have some login issues with it.
If I try a simpel HttpClient it works fine and I get access like this:
CredentialCache credentialCache = new CredentialCache();
credentialCache.Add(new Uri("http://xxx"), "Negotiate", new NetworkCredential(strUserName, strPassword, strDomain));
HttpClientHandler handler = new HttpClientHandler();
handler.Credentials = credentialCache;
var httpClient = new HttpClient(handler);
But with the WCF Web Service Reference I get this error: One or more errors occurred. (The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate'.)'
var client = new xxClient();
var task = Task.Run(async () => await client.GetContactsFromEmailAsync(_test).ConfigureAwait(false)) ;
Console.WriteLine(task.Result.ToString());
So how do I make my client "Negotiate" ? Or what else do I need to do?