Esempio n. 1
0
 internal static AuthenticationException CreateCustomException(string uri, AuthenticationException ex)
 {
     if (uri.StartsWith("https"))
     {
         return(new AuthenticationException(
                    String.Format("Invalid remote SSL certificate, overide with: \nServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => isValidPolicy);"),
                    ex));
     }
     return(null);
 }
Esempio n. 2
0
 internal static AuthenticationException CreateCustomException(string uri, AuthenticationException ex)
 {
     if (uri.StartsWith("https"))
     {
         return new AuthenticationException(
             String.Format("Invalid remote SSL certificate, overide with: \nServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => isValidPolicy);"),
             ex);
     }
     return null;
 }