Tag Archives: SQL Server 2008 R2

Login failed for user ‘IIS APPPOOLDefaultAppPool’.

Recently I faced an issue while database connectivity(SQL Server 2008 R2) on my Windows 7 machine for a web app.

Cannot open database "Database Name" requested by the login. The login failed.
Login failed for user ‘IIS APPPOOLDefaultAppPool’.

This issue was related to security.

I could resolve the issue by creating a login for user IIS APPPOOLDefaultAppPool and giving same user permission to respective database.

Steps-

First of all Login needs to be created for the user “IIS APPPOOLDefaultAppPool” in SQL Server.

Expand Security –> Right Click on Logins –> Click New Login…

image

Enter login name as “IIS APPPOOLDefaultAppPool” and Click OK.

image

To give the permission to the database

Right Click on the Database –> Properties

image

Select Permissions –> Click on Search

image

Click Browse then Select “IIS APPPOOLDefaultAppPool” user –> click OK –> click OK –> click OK

image

That’s it Smile

 

Thanks

MSCoder