Q:

cannot open database "dataBaseName" requested by the login

I'm trying to run an ASP.NET Core 2.2 application published to be hosted on IIS 10.
When I open the application through the browser, the following error shows up:

Cannot open database "dataBaseName" requested by the login 'WORKGROUP\DESKTOP-GP7EJHU$'

Connection string:
Server=.\\SQLEXPRESS01;Database=SOO;Trusted_Connection=True;MultipleActiveResultSets=true;

The DESKTOP-GP7EJHU$ is my computer name and SQL Server doesn't have a user with this name.
Where can I configure the login to connect in the database?

A:

If you still want to login sql server without username and password, you should add IIS ApplicationPool's user in sql server logins. following links may help you:

https://serverfault.com/questions/477152/how-do-i-grant-iis-apppool-orchard-access-to-sql-server-2012-developer
https://engram404.net/grant-sql-permissions-to-iis-apppool-user/
https://blogs.msdn.microsoft.com/ericparvin/2015/04/14/how-to-add-the-applicationpoolidentity-to-a-sql-server-login/
Not able to connect to database when run on Local IIS

