0
我正在尝试使用Npgsql与C#asp.net使用数据库连接,但每当我运行一些代码时都会收到一个错误代码。Npgsql错误:System.IO.IOException
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)
我已经使用了Npgsql安装程序,并试图引用它,但没有任何作品,我错过了什么?我在一个学校项目中工作,所以代码没有问题,它与我的Npgsql有关。
在此先感谢。
'其他信息:TlsClientStream.ClientAlertException:CertificateExpired'听起来像是你在服务器上的证书无效。如果这是一个学校项目,也许你不需要在你的连接上使用加密。 – jishi