I want to use the very simple WebDeploy feature to publish a webapp for a client via VPN.
IIS is on a client server, managed by trusted parties. I want to put my configuration parameters on said server, without having to write sensitive data in my code (and therefore source control).
public void ConfigureServices(IServiceCollection services)
{
EGICContext.ConnectionString = Configuration["ConnectionString"];
EGICContext.InMemory = Configuration["InMemory"] == "true";
services.AddScoped((s) => new EmailSender(Configuration["EmailSMTP"]));
}
I created a folder on client server, and wanted to edit production configuration like I do in Azure. But this modifies the web.config file, which get overriden with each publish...
This is unacceptable behaviour as the app simply breaks without configuration. I feel this should be solvable in a matter of minutes, but I spent hours searching for a solution and nothing comes up.
I can't use appsettings.json, which get overriden also, I can't put an arbitrary secrets.json in the root folder, cause the app wont read it. Environnement variables can collide with each other and seems messy...
What am I missing ?