Pingu
Pingu
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
Alright
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
I used in docker-compose.yml file:
platankaapi:
env_file:
- .env
platankaapi:
env_file:
- .env
.env:
DBCONNECTINGSTRING=mongodb://host.docker.internal:27017/
DBCONNECTINGSTRING=mongodb://host.docker.internal:27017/
program.cs:
string dbString = Environment.GetEnvironmentVariable("DBCONNECTINGSTRING");
string dbString = Environment.GetEnvironmentVariable("DBCONNECTINGSTRING");
and its Works
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
Now is working. Thank you again for gaining new experiences!
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
Okey, thank you for your time
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
yea probably
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
iam using docker compose up --build
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"Platanka__env": "mongodb://host.docker.internal:27017/"
},
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"Platanka__env": "mongodb://host.docker.internal:27017/"
},
var messageFromEnv = builder.Configuration["Platanka:env"];
var messageFromEnv = builder.Configuration["Platanka:env"];
still doesnt work
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
Okey thank you , I need try it
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
hmm , How can i put secrets in compose?
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
yes
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
mhm I used
dotnet user-secrets set "Platanka:connStr" "1234"
dotnet user-secrets set "Platanka:connStr" "1234"
and change value, and in Docker compose my WebApi returns:
Connection id "0HMU1RT1URH9C", Request id "0HMU1RT1URH9C:00000003": An unhandled exception was thrown by the application.
System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString')
Connection id "0HMU1RT1URH9C", Request id "0HMU1RT1URH9C:00000003": An unhandled exception was thrown by the application.
System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString')
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
After :
dotnet user-secrets list
dotnet user-secrets list
i got Plantaka:SMTPMail = mail...
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
here
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
when i enter in cmd dotnet user-secrets list shows me my secrets
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
I have my <UserSecretsId>id</UserSecretsId> in csproj
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
I already used this and I still dont know What I am meant to do
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
secrets file is located in .microsoft/usersecrets not in project folder
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
I am using .net webapi and secrets manager
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
No description
53 replies
CC#
Created by Pingu on 9/30/2023 in #help
✅ Reading Secret.json
No description
53 replies