[Solved] IIS Error: Login failed for user IIS APPPOOLDefaultAppPool

on Jun 13, 2022 02:46 AM

I am getting error when I published my application to my Network server 

Cannot open database "SchoolName" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.


Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jun 14, 2022 11:58 PM
on Jun 16, 2022 01:59 AM

Hi kevinf,

1. Press Windows+R to open the Run dialog box and enter inetmgr and select OK.

2. In the Connections pane, select Application Pools and then select DefaultAppPool

3. In the Actions pane, select Basic Settings.

4. In the Edit Application Pool dialog box, change the .NET CLR version to .NET CLR v4.0.30319. Select OK.

5. Again select DefaultAppPool. In the Actions pane, select Advanced Settings.

6. Change the Identity to LocalSystem. Select OK.

Then open SQL Server and expand Security.

Then expand Logins and right click on NT AUTHORITY\SYSTEM and select Properties.

Go to the User Mapping tab and select the desired database for which this error message is displayed i.e. SchoolName.

In Database role membership check the db_owner.

Click OK.