1

I am deploying an asp.net core application on IIS. I have followed the guides on Microsoft and the app is running but I have problem accessing the database. Login method is configured to windows authentication with Indentity Pooling. When checking the server log I get the following error-message:

Login failed for user 'STG\SGSTH-SRV-TST99$'. Reason: Could not find a login matching the name provided. [CLIENT: ]

The authentication works in Visual Studios but then my personal account is used for authentication. I have made sure the login exist in Security >> Logins and get an error message saying the user already exist if trying to create the user:

Error message when creating user

Any help with this issue is much appreciated.

Thanks!

IIS 10, ASP.net Core, EF Core.

  • 2
    Possible duplicate of [How to make SQL Server find a login matching the name provided?](https://stackoverflow.com/questions/7119602/how-to-make-sql-server-find-a-login-matching-the-name-provided) – Igor Aug 09 '18 at 21:34
  • You've most likely added the user to the database instance, but not to the specific database. – Voo Aug 09 '18 at 21:34
  • @Voo How would I check, and what is the solution? I have both login and user with the same name. I have the user on both the SQL-server instance and the database. – Andreas Sundström Aug 09 '18 at 22:22
  • You should not attempt to create that "user", as it is the machine itself, which of course long exists. Instead, on SQL Server side, grant this machine account permissions to log on and access your database. – Lex Li Aug 10 '18 at 01:04

0 Answers0