[英]Npgsql error: System.IO.IOException
我正在尝试使用Npgsql在C#asp.net中使用数据库连接,但是每当我运行带有连接的代码时,我都会得到一个错误代码。
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有关。
提前致谢。
您始终可以尝试使用:连接字符串中的Trust Server Certificate = True
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.