SSL authentication error: RemoteCertificateChainErrors on ASP.NET on Ubuntu

SSL authentication error: RemoteCertificateChainErrors on ASP.NET on Ubuntu

I am trying to access Gmail's SMTP service from an ASP.NET MVC site running under Mono But I keep getting this error:

System.InvalidOperationException: SSL authentication error: RemoteCertificateChainErrors   at System.Net.Mail.SmtpClient.m__3 (System.Object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, SslPolicyErrors sslPolicyErrors) [0x00000]    at System.Net.Security.SslStream+c__AnonStorey9.m__9 (System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Int32[] certErrors) [0x00000]    at Mono.Security.Protocol.Tls.SslClientStream.OnRemoteCertificateValidation (System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Int32[] errors) [0x00000]    at Mono.Security.Protocol.Tls.SslStreamBase.RaiseRemoteCertificateValidation (System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Int32[] errors) [0x00000]    at Mono.Security.Protocol.Tls.SslClientStream.RaiseServerCertificateValidation (System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Int32[] certificateErrors) [0x00000]    at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates) [0x00000]    at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 () [0x00000]    at Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () [0x00000]    at (wrapper remoting-invoke-with-check) Mono.Security.Protocol.Tls.Handshake.HandshakeMessage:Process ()   at Mono.Security.Protocol.Tls.ClientRecordProtocol.ProcessHandshakeMessage (Mono.Security.Protocol.Tls.TlsStream handMsg) [0x00000]    at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] 

I have installed certificates using:

certmgr -ssl -m smtps://

with this output:

Mono Certificate Manager - version Manage X.509 certificates and CRL from stores. Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.    X.509 Certificate v3    Issued from: C=US, O=Equifax, OU=Equifax Secure Certificate Authority    Issued to:   C=US, O=Google Inc, CN=Google Internet Authority    Valid from:  06/08/2009 20:43:27    Valid until: 06/07/2013 19:43:27    *** WARNING: Certificate signature is INVALID *** Import this certificate into the CA store ?yes   X.509 Certificate v3    Issued from: C=US, O=Google Inc, CN=Google Internet Authority    Issued to:   C=US, S=California, L=Mountain View, O=Google Inc,    Valid from:  04/22/2010 20:02:45    Valid until: 04/22/2011 20:12:45 Import this certificate into the AddressBook store ?yes  2 certificates added to the stores.

In fact, this worked for a month but mysteriously stopped working on May 5.

I installed these new certs today, but I am still getting these errors.

Generating entity class files from table schema


How to hide a content place holder in a .aspx page?
It broke my web project too, although luckily it was before i went live. Opinions on commercial MVC controlsIt was working great before then. file upload with URL rewrite enabledI tried to upgrade to a custom built 2.6, although there were more regressions.. Empty Resources Cache, provided by SQLResourceProvider ServicePointManager.ServerCertificateValidationCallback didn't job in 2.4 as it threw a NotImplemented exception.. Sending data to server (ASP.NET MVC) with Ajax(jQuery) through JSON I temporarily got around it by using: A hackaround for sure, although no code was written (this would be in use anyway).. How to get the Url for urlAction helper class?
calling a jquery function from mvc action



My setup was working correctly just like yours an then it stopped working out of no where, so I knew this the code was fine just the permissions.. This what I did to receive it working again.. sudid apt-receive install ca-certificates.

80 out of 100 based on 65 user ratings 140 reviews