2 回答

TA貢獻1806條經(jīng)驗 獲得超8個贊
正如評論中提到的,嘗試將連接字符串移至頂部(建議)修復(fù)方法是將鍵 * *置于鍵"ConnectionStrings"之外logging
應(yīng)用程序設(shè)置.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條經(jīng)驗 獲得超9個贊
問題是你的ConnectionStrings對象已經(jīng)是對象的屬性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 關(guān)注
- 315 瀏覽
添加回答
舉報