Hi all, 

I'm trying to connect to a google account but I'm getting security
exception.  
Here is my code : 
string url = String.Format
("http://www.google.com/accounts/ClientLogin?service=reader&Email={0}&Passwd={1}";,
 _username, _password);
                        HttpWebRequest wreq = (HttpWebRequest)WebRequest.Create 
(url);
                        wreq.Method = "GET";
                        HttpWebResponse response = 
(HttpWebResponse)wreq.GetResponse ();

And I get this message : 

System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.Net.WebException: Error
getting response stream (Trust failure): TrustFailure --->
System.IO.IOException: The authentication or decryption has failed. --->
Mono.Security.Protocol.Tls.TlsException: Invalid certificate received
from server.
  at
Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates
 (Mono.Security.X509.X509CertificateCollection certificates) [0x00000]

How can I solve this? 

Thanks for help

PS Sorry for my bad English I don't speak it very often.
 

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to