I have an application ASP.NET MVC 5 (.NET 4.6.2) developed using Visual Studio and I'm using Webhook from Github to deploy my aplication on Azure. I've already create the connection string on Azure so I need to push the App on GitHub without connection string (and of course not to publish my password). There are somehow to remove the connection string automatically when I push the App on GitHub?
2
-
1Better than remove it when you push, don't include it in the first place. See learn.microsoft.com/en-us/aspnet/core/security/…Eric Damtoft– Eric Damtoft2018-09-26 17:05:29 +00:00Commented Sep 26, 2018 at 17:05
-
That's exactly I looking for, works perfectly.Crislei Terassi– Crislei Terassi2018-09-26 20:35:10 +00:00Commented Sep 26, 2018 at 20:35
Add a comment
|
1 Answer
Instead of adding it in code, or in an application.config folder, it should be stored either in User Secrets, an Environment Variable (which stores it in plaintext so beware), or something like Azure Key Vault
See https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-2.1&tabs=windows for options for storing secrets during development.
1 Comment
Eric Damtoft
Fixed typo. Thanks @PeterB