On the client’s network, the application server and database server are hosted on distinct machines (different servers). When accessing the database via an API developed using .NET Core 8, we encounter the following error:
Login failed for user 'Domainname\AppserverName'."
Here, ‘AppserverName’ represents the actual computer name of the application server. Additionally, to access the database, a connection string is created within the API layer.
We would like clarification on the following two points:
- Scenario 1: When this type of user is not explicitly added to the SQL Server Security section for Windows Authentication, the above error is encountered.
Q: Why is this user required for authentication?
- Scenario 2: If this type of user is added in the SQL Server Security section but has a different functional username configured within SQL, the error persists.
Q: What steps can we take to resolve this issue in such a scenario?
It may also be noted that our applications (on ASP .Net 4.6.2) are working and connecting on this environment; however, the .Net Core 8 application is facing above issues.