title: Connect to SQL Server from IIS (ASP.Net Core)
body: <p>I spend hours trying multiple combinations to connect my asp.net core site hosted on an IIS Server to a remote SQL Server using just the SQL user and password without exit. This is my connection string in appsettings.json:</p>
  <pre><code> &quot;ConnectionStrings&quot;: {
      &quot;Booking&quot;: &quot;Server=SQLServerName;Database=Booking;User Id=XXX;Password=XXX;&quot;
    }
  </code></pre>
  <ul>
  <li>I have tried to set Integrated security = false and Trusted connection = false</li>
  <li>I changed the property Identity in the App pool to LocalSystem, although _I have tried all the options.</li>
  <li>I can connect to the database from my computer to SQLManager without any issue.</li>
  <li>In my events viewer, I see the next error: Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMAIN\NAMEOFTHESERVER$'.</li>
  <li>SQL Server 2016 in the database server, windows server 2016 in the webserver.</li>
  <li>I use windows authentication for user authentication, but I need to use a simple user and password to connect to the db.</li>
  </ul>
  <p>Any idea about what I'm doing wrong?</p>
  <p>Thank you</p>