Windows authentication issue

  • Hi All

    I have an application server APP1 in Domain DOMCORP. Then there is another SQL Server machine in DOMCORP domain. The SQL Service is running with Local system account.

    When I run an application from APP1 machine, I get error:

    System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMCORP\APP1$'.

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    The application is using trusted connection. What login I should create in SQL to fix this? And Do I need to create some group/user in active directory?

    thanks

    Online Trainer For SQL DBA and Developer @RedBushTechnologies with 18 yrs exp.

  • S_Kumar_S (3/4/2015)


    Hi All

    I have an application server APP1 in Domain DOMCORP. Then there is another SQL Server machine in DOMCORP domain. The SQL Service is running with Local system account.

    When I run an application from APP1 machine, I get error:

    System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMCORP\APP1$'.

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    The application is using trusted connection. What login I should create in SQL to fix this? And Do I need to create some group/user in active directory?

    thanks

    You don't need an AD account to connect but it is recommended.

    Create an Active Directory NT account for SQL server (recommend create another one, different, for SQL agent) and run MSSQL service under that security context. Then update your connection string at app level.

    The key is, whether SQL service service runs locally or with a Domain based account, grant necessary permissions at SQL server level. You need to create a valid login for your account.

    CREATE LOGIN [DOMCORP\APP1$] FROM WINDOWS

    DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]

    Go

  • S_Kumar_S (3/4/2015)


    Hi All

    I have an application server APP1 in Domain DOMCORP. Then there is another SQL Server machine in DOMCORP domain. The SQL Service is running with Local system account.

    When I run an application from APP1 machine, I get error:

    System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMCORP\APP1$'.

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    The application is using trusted connection. What login I should create in SQL to fix this? And Do I need to create some group/user in active directory?

    thanks

    the app server is attempting windows auth and failing, by default it will fail back to attempt auth by the servers computer account.

    Is this a web application service?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • S_Kumar_S (3/4/2015)


    Hi All

    I have an application server APP1 in Domain DOMCORP. Then there is another SQL Server machine in DOMCORP domain. The SQL Service is running with Local system account.

    When I run an application from APP1 machine, I get error:

    System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMCORP\APP1$'.

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    The application is using trusted connection. What login I should create in SQL to fix this? And Do I need to create some group/user in active directory?

    thanks

    Check Pinal's Blog, http://blog.sqlauthority.com/2014/01/17/sql-server-fix-login-failed-for-user-username-the-user-is-not-associated-with-a-trusted-sql-server-connection-microsoft-sql-server-error-18452/

  • As per your post, it seems the user is already member of AD (Domain\App$). According to me your Instance might be installed to use SQL Server authentications only.

    Kindly check the mode of authentications first. If its mixed mode than you can go ahead to create AD user as the only possibility remains that user is not part of AD.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply