2 回答
TA贡献1806条经验 获得超8个赞
正如评论中提到的,尝试将连接字符串移至顶部(建议)修复方法是将键 * *置于键"ConnectionStrings"之外logging
应用程序设置.json
{
"ConnectionStrings": {
"UserDatabase": "Server=DESKTOP-FSES7UK;Database=xxx;User Id=sa; Password=xxxxxxx;Trusted_Connection=True;"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
TA贡献1873条经验 获得超9个赞
问题是你的ConnectionStrings对象已经是对象的属性Logging。写下你的appsettings.json如下:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
},
},
"ConnectionStrings": {
"UserDatabase": "Server=DESKTOP-FSES7UK;Database=xxx;User Id=sa; Password=xxxxxxx;Trusted_Connection=True;"
}
}
- 2 回答
- 0 关注
- 192 浏览
添加回答
举报