While starting development on a new project in Windows 7, I ran across the following error when trying to access the database.
Cannot open database "<Database Name>" requested by the login. The login failed. Login failed for user 'IIS APPPOOLDefaultAppPool'.
I initially Googled the error and found this forum post that helped me solve the problem. The site is in some other language so I will go over what you need to do here.
First, find the site that your application running under in IIS.
Select the site and click on “Advanced Settings” in the column on the right. See which Application Pool your site is running under.
Now, click on “Application Pools” in IIS and select the application pool that your site is running under. Click on “Advanced Settings”.
Scroll down to the “Process Model” section and click on the identity field. Once it is selected, click on the “ellipsis” button. In the dropdown under “Built-in Account” select “LocalSystem”.