[Mono-list] Security exception when I'm trying to connect to a google Account…
LordPhoenix
lordphoenix at free.fr
Sun May 2 12:30:08 EDT 2010
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20100502/7ec20777/attachment.bin
More information about the Mono-list
mailing list