Https certificate error exception (self-signed)

I am using a self-signed temp certificate on my https server. I think it is the cause of the exception I pasted below. Is there a way I can use my self-signed certificate? Thanks.

System.Net.WebException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure —> System.IO.IOException: The authentication or decryption has failed. —> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error code: 0xffffffff800b0109 at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates) [0x00000] in :0 at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 () [0x00000] in :0 at Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () [0x00000] in :0 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] in :0 at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in :0 — End of inner exception stack trace — at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0 — End of inner exception stack trace — at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in :0 at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in :0

So you self signed a cert, your site serves it up to the requester. Here’s the skinny, this applies to windows and other platforms. They generally have a cert store of some sort, there are CA(Certificate Authority(ies)) that are trusted. Guess what, you’re not and neither is your self-signed cert.

Whats more, mono has it’s own cert store which is generally empty by default, unlike windows which gets some hot cert updates from Windows Updates to ensure the root certs are up-to-date.

Mono Security ← read that