When I use HTTP request everything works fine
public async static Task<PersonUser> getDataBase()
{
string url = $"http://my.access.point/api/rtr/Person/CheckIAmUser";
//https://github.com/EgorBo/NtlmHttpHandler
var handler = NtlmHttpHandlerFactory.Create();
handler.Credentials = new NetworkCredential("login", "password", "domain");
var httpClient = new HttpClient(handler);
var response = await httpClient.GetAsync(url);
if (response.StatusCode == HttpStatusCode.OK)
{
var json = await response.Content.ReadAsStringAsync();
var dbu = JsonConvert.DeserializeObject<PersonUser>(json);
return dbu;
}
return null;
}
But when I use HTTPS
string url = $"https://my.access.point/api/rtr/Person/CheckIAmUser";
I get this error
InnerException {System.Net.WebException: Error: TrustFailure (Authentication failed, see inner exception.) ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routine…} System.Net.WebException
VisualStudio for Mac (community) v 8.9.6
Test project on github is here https://github.com/emakhankov/ProblemNtlmHttpsXamarin