admin管理员组文章数量:1434934
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?
本文标签: netUserSecrets per LaunchProfileStack Overflow
版权声明:本文标题:.net - UserSecrets per LaunchProfile - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745620093a2666631.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论