본문 바로가기

Web_Application/.NET Core

The SSL connection could not be established, see inner exception. The remote certificate is invalid according to the validation procedure.



.NET Core Console Application 개발 시 HTTPS 접근을 시도할 때 나타나는 예외 메세지 입니다.

        static void Main(string[] args)
        {
            ServicePointManager.ServerCertificateValidationCallback +=(sender, cert, chain, sslPolicyErrors) => true;  //추가

            string result = getData();  //구현
            Console.WriteLine("{0}", result);
        }

출처 : https://stackoverflow.com/questions/2675133/c-sharp-ignore-certificate-errors


'Web_Application > .NET Core ' 카테고리의 다른 글

Scaffold-DbContext - Build failed, errors  (0) 2019.06.29