#100DaysOfCode - Day 68: LocalHost Certificates in OG .NET!
1 min
Hi friends!
Yesterday (Day 68), I spent much of my development time working to get a .NET standard project hooked up to be able to connect to a localhost API, using a .NET development certificate without a root authority.
In the specific version of .NET, it was a difficult matter trying to find the exact code needed to bypass the certificate check, but I ultimately found the answer I needed here:
this.HttpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; }; //TODO-MO REM
That was really the main part of my day, and helped me to move forward on the project (once I finally got the time).
Happy coding!
~ Moxnr
Written on January 6, 2021