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

},

相关推荐
码途行者5 小时前
缓存一致性难题:Redis 和数据库如何做到数据一致?
数据库·redis
SelectDB5 小时前
Doris VARIANT 速查:类型映射、建表写法、索引配置与常见注意点
大数据·数据库·数据分析
l1t5 小时前
几种数据库软件count(distinct)和count()from group by子查询性能测试
开发语言·数据库
夜雪一千5 小时前
如何在MySQL中实现字段级加密
android·数据库·mysql
CJi0NG5 小时前
【自用】MySQL-存储引擎
数据库·mysql
weixin_460443565 小时前
在线考试人脸识别如何合规?本地活体检测、人脸模板加密与替代认证的技术架构设计
大数据·数据库·煤矿培训考试系统·煤矿在线考试系统·煤矿安全培训·煤矿考试系统
deepseek235 小时前
SQLite WAL 开了仍报 database is locked?Python 后台任务的事务与幂等修复
数据库·python·sqlite·并发编程·wal
SelectDB6 小时前
冷热分层速查手册:参数、命令、生效判据与常见失效原因一页看完
大数据·数据库·数据分析
雨落在了我的手上6 小时前
MySQL数据库基础(9):数据库设计
数据库·mysql