I am receiving a connection error when connecting to SQL Server Express 2019 from a windows forms app using Visual Studio 2022/c#. When I attempt to open the database I get cannot open database, the Login failed. This is using Windows Authentication with the Connection string “Data Source=.SQLEXPRESS;Initial Catalog=IMSBooks;Integrated Security = True”
The database opens fine with SSMS using Windows Authentication. However when I create an sql server login it fails. I get error 233 no Process on the other end of the pipe.
Windows 11, Sql Server Express 2019
Thank in advance for any help to resolve this.
I have checked the port which is 1433 and also that Named Pipes are enabled. Security is set to “SQL Server and Windows Authentication”. SQL Server service and browser is running.