رفع مشکل خطای سرتیفیکیت در اتصال به SQL Server
mohsen•5 ماه قبل•4 ماه قبل
ارسال شده در
mohsenدر صورت بروز خطای زیر در زمان اتصال به SQL Server:
Win32Exception: The certificate chain was issued by an authority that is not trusted.
SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
می توانیم با اضافه کردن رشته زیر به کانکشن استرینگ مشکل را رفع کنیم:
TrustServerCertificate=True
یا می توانیم انکریپشن را غیر فعال کنیم:
Encrypt=false
کانکشن استرینگ به این صورت در می آید:
User ID=*****;Password=*****;Initial Catalog=AdventureWorks;Server=MySqlServer;TrustServerCertificate=True;
رای
0
ارسال نظر
مرتب سازی:
اولین نفری باشید که نظر می دهید!