title: Login failed for user '{domain}\{user}' SqlClient.SqlException in MVC
body: <p>When I deploy my app to a server, I'm getting the Login failed message. My DB and app are located on two separate physical machines. However this has not posed a problem when developing and testing locally and connecting out to the DB server; only after publishing. </p>
  
  <p><a href="https://i.stack.imgur.com/mGONQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mGONQ.png" alt="enter image description here"></a></p>
  
  <p><strong>Steps I've taken To attempt to resolve</strong></p>
  
  <ol>
  <li>In my Web.Config I've set Integrated security to false. When integrated security was true, it was giving the same error but with the machine name in place of the user name. </li>
  <li><p>I placed valid credentials in the User ID: and Password: fields of the Web.Config. The credentials placed in Web.Config are also used to log into Sql Server Management Studio directly. </p></li>
  <li><p>Within SSMS I've also verified those credentials will work under Windows Authentication and SQL Server Authentication.</p></li>
  </ol>
  
  <p>Those credentials I've set in the app work when I log into the SSMS using Windows Authentication. Advice on how to resolve this would be greatly appreciated. Thanks!</p>