I have different launchProfiles in my dotnet project and I would like the passwords to be saved in the secrets.json, but I do not manage to do so.
So the launchsettings look like this:
{
"profiles": {
"httpsSomethingElse": {
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"mariadb_database": "something1",
"mariadb_username": "something2",
"mariadb_password": "something3",
}
},
"httpsSomething": {
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"mariadb_database": "something4",
"mariadb_username": "something5",
"mariadb_password": "something6",
}
},
"httpsLocal": {
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"mariadb_database": "something8",
"mariadb_username": "something7",
"mariadb_password": "something0",
}
},
},
}
Maybe I am failing to do the format of the secrets.json properly, but none of these formats here works:
{
"httpsSomething": {
"environmentVariables": {
"mariadb_username": "something",
"mariadb_password": "something",
"mqtt_hostname": "something"
}
},
"profile": {
"httpsSomething": {
"environmentVariables": {
"mariadb_username": "something",
"mariadb_password": "something",
"mqtt_hostname": "something"
}
},
}
"httpsSomething__environmentVariables__mariadb_username": "something",
"httpsSomething__environmentVariables__mariadb_password": "something",
"httpsSomething__environmentVariables__mqtt_hostname": "something",
}
}
The reason why I tried all sorts of different approaches here is because different manuals in the internet showed different ways of doing it.
What is the proper way to do so? Maybe its not supported by secrets.json in general?