The login failed. Login failed for user 'IIS APPPOOL\ASP.NET v4.0'

iis-7, sql, windows, windows-server-2008

Solution

You can add this user to your DB Logins by openning SQL Management Studio, Navigate to your database then open the Security then Logings and add new login and search for that user

Problem

I have uploaded my website on `IIS 7` `Windows Server 2008`. Everything works fine. My site also uses database `SQL` to keep record of users. But when I try to login I get following error. ``` Cannot open database "MyCoolDb" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. Ausnahmedetails: System.Data.SqlClient.SqlException: Cannot open database "MyCoolDb" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. ```

Original source

Related problems