当前位置:   article > 正文

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

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;"

},

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

闽ICP备14008679号