Example #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;
 }
Example #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);
 }