Add IIS 7 AppPool Identities as SQL Server Logons

I'm running an IIS 7 Website with an AppPool of Integrated Pipeline Mode. The AppPools does NOT run under NetworkService, etc.. identity (by purpose), but uses it's own AppPool Identitiy (IIS AppPool\MyAppPool).

This is a so called service account or virtual account. (a user account, which is not a full account...)

I'd like to give this service account (IIS AppPool\MyAppPool) permissions to connect to my SQL Server 2008 Express (running in Mixed Auth. Mode).

While SQL Server can add any normal user account, the IIS AppPool\MyAppPool virtual account cannot be added to the valid logons (SQL Server says, that the account cannot be found).

Is there any trick, anything I need to enable to make the virtual accounts work? (the w3wp.exe process runs under this identity according to taskmgr, but I cannot use the account in NTFS security either...)

Thanks for your help!

This question and answers originated from www.stackoverflow.com
Question by (12/19/2009 3:06:34 PM)

Answer

The "IIS APPPOOL\AppPoolName" will work, but as mentioned previously, it does not appear to be a valid AD name so when you search for it in the "Select User or Group" dialog box, it won't show up (actually, it will find it, but it will think its an actual system account, and it will try to treat it as such...which won't work, and will give you the error message about it not being found).

How I've gotten it to work is:

  1. In SQL Server Management Studio, look for the Security folder (the security folder at the same level as the Databases, Server Objects, etc. folders...not the security folder within each individual database)
  2. Right click logins and select "New Login"
  3. In the Login name field, type IIS APPPOOL\YourAppPoolName - do not click search
  4. Fill whatever other values you like (i.e., authentication type, default database, etc.)
  5. Click OK

As long as the AppPool name actually exists, the login should now be created.

Answer by

Find More Answers
Related Topics  sql-server  iis7
Related Questions
  • RIA Services IIS 7 AppPool SQL Server Silverlight Failure

    I'm using custom authentication, works fine. When I try to do an insert from another part of my code I get a DomainOperationException error in my Silverlight App. I traced it back to a SQL Server (2…
  • IIS 7 cannot connect to SQL Server 2008

    Bit of a puzzle here. I have a Windows Server 2008 running IIS7 and MS SQL Server 2008 R2. I have opened up the neccessary ports on the firewall and enabled the correct SQL Server configuration o…
  • Problem using IIS 7 and SQL SERVER 2008

    I have problem using IIS 7 and SQL Server 2008. When I trying to show my website using IIS as webserver I get the message "[SqlException (0x80131904): Login failed for user..." When I using the w…
  • IIS 7 cannot log into Sql Server Database

    I have an IIS 7 application that uses a domain login. (basic settings, connect as) The application would log in as the server name at first until I set the application in it's own application poo…
  • IIS 7 cannot log into Sql Server Database

    I have an IIS 7 application that uses a domain login. (basic settings, connect as) The application would log in as the server name at first until I set the application in it's own application poo…
  • Calling IIS AppPool from SQL Server Job (2005)

    I was wondering if it’s possible to make a call to an IIS AppPool from a SQL Server Job (2005). I am basically looking to have a job monitor a table for an event and if a condition is fired I want t…
  • IIS 7 impersonation and identities

    I'm trying to get used to II7, having worked with IIS6 for quite some time. In IIS 6, I'd set <identity impersonate="true"/> in the web.config, and make sure that I applied the correct NTFS…
  • .NET 3.5, IIS 7, SQL Server 2008 hosting

    Any recomendations on what services are out there to host an ASP.NET MVC application using .NET 3.5, IIS 7, SQL Server 2008? Any recommendation on shared? VPS? Dedicated?
  • What are the open source options for a Bug tracker on IIS 7 & SQL Server 2008?

    What are the open source options for a Bug tracker on IIS 7 & SQL Server 2008? Currently we're running a Windows Server 2008 with IIS 7, Coldfusion 8 & SQL Server 2008. What are the best…
  • Best wiki software for IIS 7 & SQL Server 2008?

    I'm looking at setting up a Wiki for internal development documentation, we're an IIS 7 & SQL Server 2008 environment. What are the open source options for a Wiki for WIndows Servers?