Home Technical Help IIS error Login failed for user 'IIS APPPOOLDefaultAppPool'
IIS error Login failed for user 'IIS APPPOOL\DefaultAppPool' PDF Print E-mail
Written by Tom   


If you are experiencing the IIS error Cannot open database "My_DB"requested by the login. Login failed for user 'IIS APPPOOL\DefaultAppPool' on the we application with a SQL databse, follow the below instructions to fix the issue.

1.Goto the Internet Information Services (IIS) Manager


2. In the IIS manager click on Sites>Default Web Site>My Website. You need these 3 steps to find out what application pool your web application is using


3. On your web application (or website) right click goto Manage Application>Advanced Settings...


4. In the next window you will can see the Application Pool


5. In the IIS manager window, click Application Pools

6. Select the application pool you are using for your web application

7. Right click on the application pool and goto Advanced Settings..

8. In the Advanced Settings window goto Identity

9. In the Identity window within the Built-in Account select LocalSystem

This error may also be related to Cannot open database "My_DB" requested by the login. Login failed for user 'NT AUTHORITY\NETWORK SERVICE' in which case you need to set the user NETWORK SERVICE when accessing a database in the MS SQL Server.