Home > General > IIS 7 ApplicationPoolIdentity and SQL Server

IIS 7 ApplicationPoolIdentity and SQL Server

March 7th, 2010

IIS 7 introduced a new way to secure application pool processes from tampering with other application pools. It does this by using windows Virtual Accounts, something that isn’t used very often and most people aren’t famaliar with. To learn more about it, take a look at http://learn.iis.net/page.aspx/624/application-pool-identities

More importantly, if you want to use Windows Authentication with SQL Server using the ApplicationPoolIdentity, you can’t grant permission using the SQL Server Management Studio UI — you have to do it with SQL statements.

CREATE LOGIN [IIS APPPOOL\YourAppPoolName] FROM WINDOWS WITH DEFAULT_DATABASE=[YourDatabase]
USE [YourDatabase]
CREATE USER [IIS APPPOOL\YourAppPoolName] FOR LOGIN [IIS APPPOOL\YourAppPoolName]

where YourDatabase is the name of your SQL Server database, and YourAppPoolName is the name of the application pool.

General , ,

  1. No comments yet.
  1. No trackbacks yet.