title: Configuring Integrated Security using IIS Application Pool Identity accounts for SQL Server 2008
body: <p>I have the following configuration for a web site:</p>
  
  <ul>
  <li>Two Web front-ends  (e.g. machine names: WFE1 &amp; WFE2) 1 SQ</li>
  <li>One SQL Server Database cluster (e.g. machine name: DBCluster)</li>
  </ul>
  
  <p>All machines are in the same domain (e.g. MyDomain) running Windows 2008 R2 Enterprise and SQL Server 2008 R2.</p>
  
  <p>I am in the process of deploying a web application that uses the Application Pool Identity. I have named the pool MyWebApp, which translates to the name, [IIS APPPOOL\MyWebApp]. When I try adding this user to SQL Server I get an error:</p>
  
  <p>Windows NT user or group 'IIS APPPOOL\MyWebApp' not found. Check the name again.</p>
  
  <p>The script that I have  used to create the account in SQL Server is:</p>
  
  <p>CREATE LOGIN [IIS APPPOOL\MyWebApp] 
  FROM WINDOWS WITH DEFAULT_DATABASE=[MyDatabase], DEFAULT_LANGUAGE=[us_english]
  GO</p>
  
  <p>I imagine the problem is occuring because the IIS account is a local account which is not visible to the SQL Server box. </p>
  
  <p>Can someone please shed some light on how this problem can be resolved? Is using a domain account my only option or can I still get the application pool accounts to work?</p>