title: Connect SQL Server database using windows authentication from IIS Hosted Web API service. Login failed for user domainname\computername$
body: <p>I have hosted my WebApi service on IIS (Windows Server 2012). This service connects to SQL Server (different server) using windows authentication.
  Here is my settings on IIS
  <a href="https://i.stack.imgur.com/6CIaX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6CIaX.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/aVBoS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aVBoS.png" alt="enter image description here"></a></p>
  
  <p>identity impersonate="false"  </p>
  
  <p>SQL Server : 2012<br>
  Service Developed using .Net 2013/4.5  </p>
  
  <p>Error Message:<br>
  <a href="https://i.stack.imgur.com/lUsRJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lUsRJ.png" alt="enter image description here"></a></p>
  
  <p>Connection String: = Server=XXXXXXX;Database=XXX;Integrated Security=true;" providerName="System.Data.SqlClient"</p>
  
  <p>Appreciate any help.</p>