Saturday, October 2, 2010

Login failed for user IIS APPPOOL\DefaultAppPool troubleshooting

This error...

Cannot open database "SportsStore" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
A severe error occurred on the current command.  The results, if any, should be discarded.

...has this solution:

Open Microsoft SQL Server Management Studio

Go to Logins node under Security.

Add a new Login, name it: IIS APPPOOL\DefaultAppPool

Then select the User Mapping on left pane, then check the Map column of your database (e.g. SportsStore).  Then check the db_owner on Database role membership of your user IIS APPPOOL\DefaultAppPool on your database SportsStore


  1. FINALLY!!! Thanks. After trying so many things, this finally solved my issues!!

    Thanks for actually explaining how to do this, instead of just saying "change the identity to networkservice"!

  2. Thank you
    Thank you
    Thank you :-)

  3. Thanks a lot..:)
    Its working for me...

  4. Thank u sir, you saved me.

  5. Worked for me aswell.