C
Join ServerC#
help
❔ MySQL publishing question
SStrawHatGoofy1/29/2023
I'm working on a habit tracker using c# and mysql and i was about to publish it and send it off to github but i realized it has my MySQLWorkbench database password in it. I know its not a big deal since no one can get access to database but its a password that i use often. is there a way to hide the password and still have the connection still work?
AAngius1/29/2023
appsettings.json
SStrawHatGoofy1/29/2023
ah ok i started it as a console app and i dont think i have app settings.
AAngius1/29/2023
Ah, I assumed it's an ASP app
AAngius1/29/2023
In that case, whatever other config file you want, really
SStrawHatGoofy1/29/2023
i should try asp everywhere i look is looking for asp.net
AAngius1/29/2023
I mean, if you want to make a web application, ASP would be the way to go, sure
Jjcotton421/29/2023
@Angius @StrawHatGoofy prefer https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0 to appsettings
Jjcotton421/29/2023
appsettings goes in the repo, which means there's a risk of it being committed
Jjcotton421/29/2023
user secrets are nowhere near your repo
AAccord1/30/2023
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.