当前位置:   article > 正文

efcore 8A connection was successfully established with the server, but then an error occurred during

a connection was successfully established with the server, but then an error

一、EF Core8  数据库连接字符串报错

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

解决方案:

连接字符串增加标识

TrustServerCertificate=True

或者加(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;"

},

字符串格式2:

 "SqlServer": "data source=xxx;initial catalog=QL.Back.Template6;uid=xxx;pwd=xxxx;TrustServerCertificate=True;"

更多:

EF Core8 Only the invariant culture is supported in globalization-invariant mode

EfCore 表关系一对一,使用案例

EF 框架的简介、发展历史;ORM框架概念

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/601815
推荐阅读
相关标签
  

闽ICP备14008679号