title: System.ArgumentNullException: 'Value cannot be null. (Parameter 'connectionString')' 2
body: <p>This line is causing an error in my project:</p>
  <pre><code>options.UseSqlServer(Configuration.GetConnectionString(&quot;SchoolContext&quot;)));
  </code></pre>
  <p>Error:</p>
  <blockquote>
  <p>System.ArgumentNullException: 'Value cannot be null. (Parameter 'connectionString')'</p>
  </blockquote>
  <p>I have read through a bunch of similar problems online and I cannot find a change that works. It seems that the parameter inside <code>UseSqlServer()</code> is returning null. This leads me to believe that I have a configuration mistake.</p>
  <p>Here is my code for my Startup and json files:</p>
  <pre><code>using Microsoft.AspNetCore.Builder;
  using Microsoft.AspNetCore.Hosting;
  using Microsoft.AspNetCore.HttpsPolicy;
  using Microsoft.Extensions.Configuration;
  using Microsoft.Extensions.DependencyInjection;
  using Microsoft.Extensions.Hosting;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using Microsoft.EntityFrameworkCore;
  using ContosoUniversity.Data;
  
  namespace ContosoUniversity
  {
      public class Startup
      {
          public Startup(IConfiguration configuration)
          {
              Configuration = configuration;
          }
  
          public IConfiguration Configuration { get; }
  
          // This method gets called by the runtime. Use this method to add services to the container.
          public void ConfigureServices(IServiceCollection services)
          {
              services.AddRazorPages();
  
              services.AddDbContext&lt;SchoolContext&gt;(options =&gt;
                 options.UseSqlServer(Configuration.GetConnectionString(&quot;SchoolContext&quot;)));
  
              services.AddDatabaseDeveloperPageExceptionFilter();
          }
  
          public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
          {
              if (env.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();
                  app.UseMigrationsEndPoint();
              }
              else
              {
                  app.UseExceptionHandler(&quot;/Error&quot;);
                  app.UseHsts();
              }
  
              app.UseHttpsRedirection();
              app.UseStaticFiles();
  
              app.UseRouting();
  
              app.UseAuthorization();
  
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapRazorPages();
              });
          }
      }
  }
  </code></pre>
  <pre><code>{
    &quot;ConnectionStrings&quot;: {
      &quot;DefaultConnection&quot;: &quot;Server=(***;Database=***;Trusted_Connection=True;MultipleActiveResultSets=true&quot;
    },
    &quot;Logging&quot;: {
      &quot;LogLevel&quot;: {
        &quot;Default&quot;: &quot;Information&quot;,
        &quot;Microsoft&quot;: &quot;Warning&quot;,
        &quot;Microsoft.Hosting.Lifetime&quot;: &quot;Information&quot;,
        &quot;Microsoft.EntityFrameworkCore.Database.Command&quot;: &quot;Information&quot;
      }
    },
    &quot;AllowedHosts&quot;: &quot;*&quot;
  }
  </code></pre>
  <p>Any assistance is appreciated. Thanks.</p>