Cannot open database “” requested by the login. The login failed. Login failed for user ‘IIS APPPOOL\DefaultAppPool’.

Category : C#, VB.Net

Cannot open database “” requested by the login. The login failed.
Login failed for user ‘IIS APPPOOL\DefaultAppPool’.

I got this error when I added an app onto IIS 7 and was trying to hit my local Database. Here is the fix:

1) In IIS7 – Click ‘Application Pools’ (left side)


2) On Top Right – Click ‘Set Application Pool defaults’


3) Finally, set ‘Process Model > Identity’ to ‘Local System’

Post a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word