I wrote my C# code in Visual Studio with a service-based sql database and it worked on my windows 10 correctly. After that, I copied the "released" folder of the project to another computer with windows server. But when I run the application on new computer a get this error:
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
It seems the reason is that a sql server instance is not installed on new windows.
my connection string to that database in my code is:
@"Data Source=.\sqlexpress;AttachDbFilename=" + Directory.GetCurrentDirectory() + @"\MembersDB.mdf;Integrated Security=True;User Instance=True"
My question is what exactly should I install on new computer to solve the problem and where can I download it?