the request was aborted could not create ssl/tls secure channel. csharp restsharp

Code Example - the request was aborted could not create ssl/tls secure channel. csharp restsharp

                
                        //Add this line of code before RestClient
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
                    
                
 

The request was aborted: Could not create SSL/TLS secure channel

                        
                                // using System.Net;
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Use SecurityProtocolType.Ssl3 if needed for compatibility reasons
                            
                        
 

could not create ssl/tls secure channel

                        
                                // using System.Net;
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Use SecurityProtocolType.Ssl3 if needed for compatibility reasons
                            
                        
 

csharp The request was aborted: Could not create SSL/TLS secure

                        
                                ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
                   | SecurityProtocolType.Tls11
                   | SecurityProtocolType.Tls12
                   | SecurityProtocolType.Ssl3;
                            
                        
 

iwr : The request was aborted: Could not create SSL/TLS secure channel.

                        
                                [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://apod.nasa.gov/apod/