Question: I having the following error message:

> 
> Cannot open database "SmallBakery" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\MyAppPool'
> 
> 
> 

How can correct this? I am using windows 7 Enterprise Edition and Sql server 2012.

Answer: 
It depends on how you want to authenticate in your app. Are you trying to use impersonation in your app?

What's happening right now is the identity of your app pool in IIS is getting passed when trying to access the database. You can change the identity of your app pool to be something that has access to the database or you could change your connection string to use a specific login instead of integrated security.
Check this post out. Your problem sounds similar to one I was running into, with the same exact error message.

<http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx>