Friday, 20 December 2013

Login failed for user 'IIS APPPOOL\DefaultAppPool'

if you get this error:
Login failed for user 'IIS APPPOOL\DefaultAppPool'
Here's a few things to watch out for
  • If you have the setting: Integrated Security=true in your web.config file , set it to false or remove it.
  • In IIS Manager go to Application Pools and select the one running your web app. Go to Advanced Settings, Process model and make sure Identity is set to NetworkService
  • Restart the website
That should sort it.

Update: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

Let's say you follow the previously outlined steps and you still get this error: "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'". You can try the following solution:

  • In SQL Server Management Studio go to Security -> Logins
  • Right Click on NT AUTHORITY\NETWORK SERVICE -> Properties -> User Mappings.
  • Select the Database in question and make sure the User has the db_owner and public checkboxes ticked.

No comments: