title: Cannot open database "MyDatabaseName" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\MyAppName
body: <p>I have created a web application. I am using SQL 2012 express as a database. Its working fine when I am running on debug mode. When I deployed that application on local IIS it's throwing an error </p>
  
  <blockquote>
    <p>Cannot open database "databaseName" requested by the login. The login failed.
     Login failed for user 'IIS APPPOOL\MyApplicationName'.</p>
  </blockquote>
  
  <p>My connection string is <code>&lt;add name="DefaultConnection" connectionString="Data Source=HAPPY\SQLEXPRESS;uid=sa;password=123;Initial Catalog=dwm;integrated security=sspi;" providerName="System.Data.SqlClient" /&gt;</code></p>
  
  <p>I am able to login with this login detail on my SQL 2012 express. I am attaching a screenshot <a href="https://i.stack.imgur.com/byDQm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/byDQm.jpg" alt="enter image description here"></a>.</p>