Reputation:
I am trying to use Npgsql to use database connections with C# asp.net, but I get an error code whenever I run some code with a connection in it.
An exception of type 'System.IO.IOException' occurred in Npgsql.dll but was not handled in user code
Additional information: TlsClientStream.ClientAlertException: CertificateExpired
at TlsClientStream.TlsClientStream.SendAlertFatal(AlertDescription description, String message)
at TlsClientStream.TlsClientStream.ParseCertificateMessage(Byte[] buf, Int32& pos)
at TlsClientStream.TlsClientStream.TraverseHandshakeMessages()
at TlsClientStream.TlsClientStream.GetInitialHandshakeMessages(Boolean allowApplicationData)
at TlsClientStream.TlsClientStream.PerformInitialHandshake(String hostName, X509CertificateCollection clientCertificates, RemoteCertificateValidationCallback remoteCertificateValidationCallback, Boolean checkCertificateRevocation)
I've used the Npgsql installer and tried with just referencing it,but nothing works,what am I missing? I am working in a school project so there is nothing wrong with the code, its something with my Npgsql.
Thanks in advance.
Upvotes: 0
Views: 609
Reputation: 1384
You can always try to use: Trust Server Certificate=True in your connection string
Upvotes: 0