本文主要是介绍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;"
},
这篇关于A connection was successfully established with the server but then an error的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!