This is just to tell everyone that if you want to connect to SQL Server with the ApplicationPoolIdentity login, you can, but you can't use the user interface of SQL Management Studio.
You can do this only from script (like when you want to give access to this user to NTFS you can't do it from the explorer security tab).
CREATE LOGIN [IIS APPPOOL\mypool] FROM WINDOWS WITH DEFAULT_DATABASE=[master] USE [mydatabase] CREATE USER [IIS APPPOOL\mypool] FOR LOGIN [IIS APPPOOL\mypool]
So you can give the access right directly to this "virtual" user, withoug the need to use the impersonate=true setting in web.config.
We used it with SQL 2005 in Win2008 sp2 (not R2), with IIS 7.0
Hope it may help someone, because I took me a lot of time to find it !
ASP.NET ImpersonationApplication Pool IdentityAuthenticationSQL
If SQL Sever installed on another machine which is joined to a domain, then ApplicationPoolIdentity use the server's machine account to access SQL Server Database.
I had no luck in trying to create a login for the "IIS Apppool\mydefaultool)".
Does this virtual account(Application pool identity) can be used to access the DB hosted on remote sql server? if so how as i am not able to create a login for this account.
I had no luck in trying to create a login for the "IIS Apppool\mydefaultool)".
Does this virtual account(Application pool identity) can be used to access the DB hosted on remote sql server? if so how as i am not able to create a login for this account.
Please let me know if you have any pointers on this
Hi, I can't use ApplicationPoolIdentity to access SQL over network (it's on another server). I got the error: login failed for user anonymous. Anyone know how to make it work? Thanks.
AppPoolIdentity is only available locally. To use remote authentication, set a domain user as user of the pool, and set this user rights on your remote sql database too. It's preferable to use this method. Set your anonymous authentication as "app pool identity".
If you don't or can't use domain user, you can use a SQL server uid/pwd in your connection string, and a this user must be created in your security/login section of SQL server.
foxontherock
41 Posts
ApplicationPoolIdentity + SQL
Nov 09, 2009 02:01 PM|LINK
You can do this only from script (like when you want to give access to this user to NTFS you can't do it from the explorer security tab).
CREATE LOGIN [IIS APPPOOL\mypool] FROM WINDOWS WITH DEFAULT_DATABASE=[master] USE [mydatabase] CREATE USER [IIS APPPOOL\mypool] FOR LOGIN [IIS APPPOOL\mypool]
So you can give the access right directly to this "virtual" user, withoug the need to use the impersonate=true setting in web.config.
We used it with SQL 2005 in Win2008 sp2 (not R2), with IIS 7.0
Hope it may help someone, because I took me a lot of time to find it !
ASP.NET Impersonation Application Pool Identity Authentication SQL
Leo Tang - M...
4161 Posts
Microsoft
Re: ApplicationPoolIdentity + SQL
Nov 11, 2009 08:35 AM|LINK
Hi,
Thanks for share!
If SQL Sever installed on another machine which is joined to a domain, then ApplicationPoolIdentity use the server's machine account to access SQL Server Database.
Below are some more information, hope help others too.
Application Pool Identities
http://learn.iis.net/page.aspx/624/application-pool-identities/
Feedback to us
Develop and promote your apps in Windows Store
balak
2 Posts
Re: ApplicationPoolIdentity + SQL
Jan 22, 2010 06:06 PM|LINK
Hello,
I had no luck in trying to create a login for the "IIS Apppool\mydefaultool)".
Does this virtual account(Application pool identity) can be used to access the DB hosted on remote sql server? if so how as i am not able to create a login for this account.
Please let me know if you any pointers on this
Regards
balak
2 Posts
Re: ApplicationPoolIdentity + SQL
Jan 22, 2010 06:06 PM|LINK
Hello,
I had no luck in trying to create a login for the "IIS Apppool\mydefaultool)".
Does this virtual account(Application pool identity) can be used to access the DB hosted on remote sql server? if so how as i am not able to create a login for this account.
Please let me know if you have any pointers on this
haldiggs
4 Posts
Re: ApplicationPoolIdentity + SQL
Jan 28, 2011 08:26 PM|LINK
Thanks for reporting this. I'm on 2008 sever and had no access to this account. You saved me.
SvenAelterma...
2 Posts
Re: ApplicationPoolIdentity + SQL
May 23, 2011 04:27 AM|LINK
I realize this is an old thread, but I was able to use the Management Studio with Denali CTP 1 to create this user account.
Denali
stephena55
7 Posts
Re: ApplicationPoolIdentity + SQL
Aug 28, 2011 06:54 AM|LINK
foxontherock
41 Posts
Re: ApplicationPoolIdentity + SQL
Aug 28, 2011 02:23 PM|LINK
harpreet81
2 Posts
Re: ApplicationPoolIdentity + SQL
Aug 30, 2011 05:11 AM|LINK
http://learn.iis.net/page.aspx/624/application-pool-identities/
You need to use Domain\MachineName$ account, It cleary says:
What about AppPool identities?
The good news is that Application Pool identities also use the machine account to access network resources. No changes are required.