[英]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.