title: Dynamically Modifying appsettings.json and Refreshing Web Application - ASP.NET Core and Docker
body: <p>I am currently trying to design a service that serves as a central place for configuration.  However, I noticed there are quite a few services in <code>ConfigurationServices</code> in <code>Startup.cs</code> that use various settings from <code>appsettings.json</code>:</p>
  <p>For example:</p>
  <pre><code>services.AddDbContext&lt;MyContext&gt;(optionsAction: options =&gt;
  {
       options.UseSqlServer(Configuration.GetConnectionString(name: &quot;somekey&quot;));
  });
  </code></pre>
  <p>I know if I go into the <code>docker</code> container of a .net core web app and manually change something in <code>appsettings.json</code> with <code>nano</code> and restart the service, it acknowledges the new configuration and uses it.  The same with environment variables.</p>
  <p>However, I am trying to determine if possible if there was a way to update/modify <code>appsettings.json</code> dynamically and get the services in in <code>ConfigurationServices</code> in <code>Startup.cs</code> to acknowledge the changes without actually restarting the service.</p>
  <p>Any help would be much appreciated.</p>