WEb API WITH WPF

anil kumar 61 Reputation points
2021-12-13T10:13:46.553+00:00

I am using webapi core 5 and binding combobox on wpf page
but it give two exceptions as screenshot attached

157126-wpf.png

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | XAML
Developer technologies | XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,861 Reputation points
    2021-12-29T12:08:07.113+00:00

    I would not recommend doing this in production but you could ignore the ssl errors

        HttpClientHandler clientHandler = new HttpClientHandler();
        clientHandler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => { return true; };
    
        // Pass the handler to httpclient(from you are calling api)
        var client = new HttpClient(clientHandler)
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.