Last night I wanted to share our currently developed CMS (ASP.NET 2.0 project), so I copied the working application from my developer machine to a home server running on Windows 7, IIS 6.1. After I configured the connection string, I got the following error:
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
It’s not a simple “Login failed” message, adding rights to the database didn’t solve the problem. The solution was changing the Application Pool of the website deep inside the IIS Manager:
In IIS, choose the website that tries to connect to the database, and click on “Advanced Settings”. 
Take a look at the Application Pool used, in this case DefaultAppPool.
Now go to the Application Pools in IIS root, right click the DefaultApplicationPool and choose Advanced Settings. Find the Identity field and choose LocalService as the Built-in account.
Now try again with your website.