AccessTokenRequestSample.ConsoleApplication/Program.cs
/// <summary>
/// Sets TLS to version 1.2
/// </summary>
Sets TLS to version 1.2
Sets TLS to version 1 . 2
private static void SetSecurityProtocol()
        {
            ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) =>
            {
                return true;
            };
            System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
        }
private static void SetSecurityProtocol ( ) { ServicePointManager . ServerCertificateValidationCallback += ( sender , certificate , chain , errors ) => { return true ; } ; System . Net . ServicePointManager . SecurityProtocol = SecurityProtocolType . Tls12 ; }
Sets TLS to version 1.2
Sets TLS to version 1 . 2