[SqlException (0x80131904): Login failed for user 'DLU\DLU09$'.]

0

I have and old asp application that need to access a sql database I want to use network user but I'm getting this error

[SqlException (0x80131904): Login failed for user 'DLU\DLU09$'.]

I have added DLU\DLU09$ as a user to the database and granted it access rights to the tables.

sql-server
database
vb.net
security
asked on Stack Overflow Nov 23, 2020 by Thokle • edited Nov 23, 2020 by jarlh

1 Answer

0

A local account can't be used to access network resources. A work around is to use the machine account. You do not specify the password. This will work only for machines in the same domain. The infrastructure has to be working. There's plenty that can go wrong...KERBEROS, SPN, trust, etc.

A better approach is to set the application pool to run as a domain account. Then the web app runs as that account and that account can be granted access in SQL. Or perhaps set the connection string to use a sql server login rather than a trusted connection. (I don't like it when folks put passwords in plain text.)

The security event log might have some information if the machine account is not working.

answered on Stack Overflow Nov 23, 2020 by Randy in Marin

User contributions licensed under CC BY-SA 3.0