A connection was successfully established with the server but then an error

 

在使用EFCore生成數據庫的時候,報上面的錯誤!
解決方法:
加(Encrypt=True;TrustServerCertificate=True;)即可:
 
"ConnectionStrings": {
  "DefaultConnection": "Data Source=LAPTOP;Initial Catalog=DB;persist security info=True;User ID=sa;Pwd=XXXXX;Encrypt=True;TrustServerCertificate=True;"
},
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章