Task Management error: SQL connection failed, current user=IIS APPPOOL\SMP Server AppPool
search cancel

Task Management error: SQL connection failed, current user=IIS APPPOOL\SMP Server AppPool

book

Article ID: 172135

calendar_today

Updated On: 04-11-2025

Products

IT Management Suite

Issue/Introduction

Disabling ASP.NET Impersonation in Authentication setting for TaskManagement application causes IIS user to authenticate with SQL server and the following error is seen:

"7/18/2018 2:41:23 AM","[5/5] SQL connection failed, current user=IIS APPPOOL\SMP Server AppPool, total time=00:00:05.0468680

Login failed for user 'DOMAIN\computername$'.
   [System.Data.SqlClient.SqlException @ .Net SqlClient Data Provider]
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Altiris.NS.Utilities.DbUtils.TryCreateConnection(String costring, Int32 retries, Int32 delay, Int32 add)
SQL Exception details: code=18456, line=65536

Exception logged from:
   at Altiris.NS.Utilities.DbUtils.TryCreateConnection(String, Int32, Int32, Int32)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String, String, String, String)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String)
   at Altiris.NS.ContextManagement.AdminDatabaseContext.OpenDbConnection()
   at Altiris.Database.DatabaseContext<T>.Initialize(Boolean, System.Data.IsolationLevel)
   at Altiris.Database.DatabaseContext<T>.CreateFirstContext(Altiris.Database.ContextTransactionMode, System.Nullable<System.Data.IsolationLevel>, Altiris.Database.DatabaseContextStack<T>, Boolean)
   at Altiris.Database.DatabaseContext<T>.GetContextImpl(Altiris.Database.ContextTransactionMode, System.Nullable<System.Data.IsolationLevel>, Boolean)
   at Altiris.Database.DatabaseContext<T>.GetContext(Altiris.Database.ContextTransactionMode, System.Nullable<System.Data.IsolationLevel>, Boolean)
   at Altiris.NS.DataAccessLayer.Implementation.Altiris_NS_UI_Controls_DataAccessLayerPersonalizationDataAccessLayer.spUserSettingsGet(String, String)
   at Altiris.NS.UI.Controls.UserSettings.LoadSettings(String, String, String)
   at Altiris.NS.UI.Controls.UserSettings.LoadSettings(String)
   at Altiris.NS.ContextManagement.CultureContext.GetOverrideCultureInfo()
   at Altiris.NS.ContextManagement.CultureContext.GetOverrideCulture()
   at Altiris.NS.ContextManagement.CultureContext.GetContext(String)
   at Altiris.NS.UI.AltirisWebApplication.PerformCultureSetup(System.Web.HttpApplication, String)
   at Altiris.NS.UI.AltirisWebApplication.PerformPreRequestSetup(System.Web.HttpApplication, String, Boolean, Boolean)
   at System.Web.HttpApplication+SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication+IExecutionStep, Boolean&)
   at System.Web.HttpApplication+PipelineStepManager.ResumeSteps(Exception)
   at System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, AsyncCallback)
   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
   at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus&)
   at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus&)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)

User [IIS APPPOOL\SMP Server AppPool], Auth [IIS APPPOOL\SMP Server AppPool], AppDomain [/LM/W3SVC/1/ROOT/Altiris/TaskManagement-2-131763301375064339]

HTTP [GET]: http://computername/Altiris/TaskManagement/ClientTask/RegisterTaskServer.aspx?clientTaskServerGuid=37fa4df8-6334-469f-b32b-adcded3ec7e5&resourceGuid=37fa4df8-6334-469f-b32b-adcded3ec7e5&version=8.1&build=5454&httpPort=80
 ip: [172.20.5.211];
 response: [200 OK]; x-smp-nsversion: [8.1.4528.0];
","DbUtils.CreateConnection","Altiris.NS.dll","1180","Errors"

Environment

ITMS 8.x

Cause

Connection to SQL server must be performed by an authorized user, and the application needs to be configured to automatically impersonate as application identity whenever required.

Disabling ASP.NET Impersonation would cause the application to authorize using the default IIS user.

Resolution

Using IIS Manager, find the TaskManagement application under the Default Web Site\Altiris site and open the Authentication settings.

The default settings are:

  • Anonymous Authentication - Disabled
  • ASP.NET Impersonation - Enabled
  • Basic Authentication - Disabled
  • Digest Authentication - Disabled
  • Forms Authentication - Disabled
  • Windows Authentication - Enabled