Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Background:

I have a application pool [ABCDEMO] in IIS. The identity of the appool is "NetworkService". I am trying to add IIS APPPOOL\ABCDEMO to my SQL SERVER 2012 on a Windows SERVER 2012.

When I try to add to the Logins I get the following error.

===================================

Create failed for Login 'IIS APPPOOL\ABCDEMO'.  (Microsoft.SqlServer.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl()
   at Microsoft.SqlServer.Management.SqlManagerUI.CreateLoginData.LoginPrototype.ApplyGeneralChanges(Server server)
   at Microsoft.SqlServer.Management.SqlManagerUI.CreateLogin.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

===================================

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ExecuteNonQuery(StringCollection queries, Boolean includeDbContext)
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImplFinish(StringCollection createQuery, ScriptingPreferences sp)
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl()

===================================

Windows NT user or group 'IIS APPPOOL\ABCDEMO' not found. Check the name again. (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=15401&LinkId=20476

------------------------------
Server Name: USALVWCOQA10
Error Number: 15401
Severity: 16
State: 1
Line Number: 1


------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
share|improve this question
    
Does the user/group exist ? Error says Windows NT user or group 'IIS APPPOOL\ABCDEMO' not found. Check the name again –  Kin Nov 1 '13 at 20:26
    
'IIS APPPOOL\ABCDEMO' means the computername is IIS APPPool. But space is not valid in a computername (MS KB 204032). So the name cannot be correct. –  Sunzi Nov 1 '13 at 21:27
    
@Sunzi actually no. It means a modern server is used and the IIS APPPOOL percmission limitation is put in - this is not a "real" account. This is not a computer name. iis.net/learn/manage/configuring-security/… has more information. –  TomTom Jan 31 at 13:27
    
@TomTom Thanks for the information. Seems I'm not completly up to date anymore. –  Sunzi Jan 31 at 21:44
add comment

2 Answers

It's probably because that's not the way that the SQL Server instance is seeing the application. Attempt to use the application. This should log an error in the SQL Server's ERRORLOG file when the application isn't able to connect. This will tell you how the SQL Server is seeing the login. Just copy the login from the ERRORLOG file and create a login for it.

share|improve this answer
add comment

When using Apppool identity: You have to start the Apppool (a process hosting the application pool) in order for the account to get created.

EDIT: Either set the Identity of the application pool to "Application pool identity" and the use [IIS Apppool\Name] or create a login for network service (NT AUTHORITY\NetworkService) in your sql server, because that is what your process will be running as.

Looks like you are confusing the two things.

share|improve this answer
    
In addition, iis.net/learn/manage/configuring-security/… has more information how that all works. –  TomTom Jan 31 at 13:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.