title: Login failed for user 'IIS APPPOOL\
body: <p>I'm using SQL Server 2014 in my local system. There is an MVC application with .NET Framework 4.6.1 and it worked fine.</p>
  <p>Now, I've created a new MVC application with .NET Framework 4.7.2 and see this issue. The local website is unable to connect to the Database.</p>
  <blockquote>
  <p>System.Data.SqlClient.SqlException   Cannot open database &quot;NewApp&quot;
  requested by the login. The login failed. Login failed for user 'IIS
  APPPOOL\dev.newapp.com'.</p>
  </blockquote>
  <p>I have checked the User Mapping properties and both applications are listed. I did not make any changes in IIS or the SQL Server.</p>
  <p>Also, I tried changing the Identity in IIS for DefaultAppPool to LocalSystem with no luck.</p>
  <p>The IIS, SQL server &amp; the website - all are in the same machine.<br />
  <a href="https://i.stack.imgur.com/xQAPZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xQAPZ.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/RFqS5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RFqS5.png" alt="enter image description here" /></a></p>