How to Connect to Sql Server running in Linux Docker Container from IIS running locally on Windows 11 machine

181 Views Asked by At

We are running ASP.NET apps locally on our dev machines in IIS. We'd like to run Sql Server in a Linux Container rather than installing it on our machines.

We have Sql Server Running and are able to connect to it via SSMS and create db schemas, etc. However, when we attempt to add a New Login for a local user that we would typically associate with an IIS App Pool, it fails with the following error

TITLE: Microsoft SQL Server Management Studio
------------------------------

Create failed for Login 'DEV17\IISAppPool'.  (Microsoft.SqlServer.Smo)

For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=16.100.47008.0&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Windows NT user or group 'DEV17\IISAppPool' not found. Check the name again. (Microsoft SQL Server, Error: 15401)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-15401-database-engine-error

------------------------------
BUTTONS:

OK
------------------------------

An odd thing is that when do "Check Names" in the search, it finds the name Check Names Result

The User exists computer management view

Is there a way for us to grant IIS App Pools access to Sql Server databases with Sql Server running in a Linux container on a Windows 11 machine?

0

There are 0 best solutions below