I'm trying to help a client setup an environment for an old classic ASP application and we ran into this issue when connecting to the SQL Server database.
The error we get is "Login failed for user 'WORKGROUP\LocalComputerName$'."
Which is pretty self-explanatory. I figured it might be related to the Identity used by the Application Pool in IIS, but after changing it to a specific user I kept getting the exact same error. Then I found this article: Login failed for user 'DOMAIN\MACHINENAME$'
So, what seems to be happening is that the connection is assuming the SQL Server is a remote computer and thus it is trying to authenticate using the name of the computer instead of the current user.
Now the tricky part:
- The environment isn't in a domain so the computer cannot be added to the users in SQL Server
- I don't have access to the actual logic that connects to the DB, I just know that it uses a specific system DSN to do it.
- I cannot pass arguments to the connection at all. I need to make it work via a DSN.
I can modify the DSN in any way I want, as well as the IIS and the SQL Server though.
Any ideas on how to setup a DSN that doesn't require password/username to be passed in by the code and can connect to the SQL Server using a local user instead of the computer name.
Thanks.