title: How to setup the connectionString when hosting a .net core appl on IIS, Windows 10?
body: <p>I was following this <a href="https://www.youtube.com/watch?v=_Z1Lg7ssD8I" rel="nofollow noreferrer">video on YouTube</a> on how to host an Asp.net Core application on <em>IIS</em>, Windows 10. Which worked fine. Now I tried to build on top of that by adding a <strong>connectionString</strong> to a sql server instance on my local computer. </p>
  
  <p>when running the application using visual studio, it working fine. However, when I publish that to a folder and then run it using <em>IIS</em>, it's throwing an error.</p>
  
  <p>This is my connection:</p>
  
  <pre><code>"ConnectionStrings": {
     "MembersDatabase": "Data Source=.;Initial Catalog=MembersDb;Integrated Security=True"
   }
  </code></pre>
  
  <p>And this is how I'm accessing it:</p>
  
  <pre><code>services.AddDbContext&lt;MembersContext&gt;
                  (options =&gt; options.UseSqlServer(Configuration.GetConnectionString("MembersDatabase"))
              );
  </code></pre>
  
  <p>Is there a particular way of setting up the <strong>connectionstring</strong>? This is my first time doing this.</p>
  
  <h1>EDIT</h1>
  
  <p>This is not a production setup. I'll clone the real application on this laptop. After I've successfully completed the setup, this laptop will be used to demo the application. </p>