How-to-simply...

Add IIS 7 AppPool Identities as SQL Server Logons

  • 1 In SQL Server Management Studio
  • 2 CREATE LOGIN [IIS APPPOOL\YourAppPoolName] FROM WINDOWS WITH DEFAULT_DATABASE=[YourDatabase]
    USE [YourDatabase]
    CREATE USER [IIS APPPOOL\YourAppPoolName] FOR LOGIN [IIS APPPOOL\YourAppPoolName]
  • 3 In SSMS refresh YourDatabase\Security\Users doubleclick on the newly created account
  • 4 Set permitions
  • N IUSR should have read write acces to your database mdf file

References