You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to configure via appsettings.json and it works if I use full connection string. However the documentation says that you can specify the name of the connection string used in connection strings settings, but it doesn't seem to work or I have something wrong.
However based on my understanding, this is supposed to work...
"To use a connection string from the element of your application config file, specify its name as the value of the connection string."
Hi - I'd guess this might be a limitation in the Microsoft.Extensions.Configuration support; I know connection string names work for the full framework/<appSettings>, but haven't seen the equivalent tested for .NET Core etc.
I am trying to configure via appsettings.json and it works if I use full connection string. However the documentation says that you can specify the name of the connection string used in connection strings settings, but it doesn't seem to work or I have something wrong.
This works...
"ConnectionStrings": {
"MYDB": "Data Source=XXX;Initial Catalog=XXXX;Integrated Security=True",
},
"Serilog": {
"MinimumLevel": {
"Default": "Verbose",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "MSSqlServer",
"Args": {
"restrictedToMinimumLevel": "Verbose",
"connectionString": "Data Source=XXX;Initial Catalog=XXXX;Integrated Security=True",
"tableName": "Logs"
}
}
]
}
}
However based on my understanding, this is supposed to work...
"To use a connection string from the element of your application config file, specify its name as the value of the connection string."
"ConnectionStrings": {
"MYDB": "Data Source=XXX;Initial Catalog=XXXX;Integrated Security=True",
},
"Serilog": {
"MinimumLevel": {
"Default": "Verbose",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "MSSqlServer",
"Args": {
"restrictedToMinimumLevel": "Verbose",
"connectionString": "MYDB",
"tableName": "Logs"
}
}
]
}
}
What am I not understanding or is this not supported?
The text was updated successfully, but these errors were encountered: