Emmmanuel FIADUFE

Emmmanuel FIADUFE

  • 2k
  • 98
  • 1.7k


May 8 2022 4:18 PM

Hello Team,

I develop an invetory management system and deploy it, and I run the setup on my laptop and everything work fine, and when I run this same setup on my friend laptop I keep getting bellow error so I thought becuase i didn't install SSMSQLSERVER and sqlexpress that is why so I install both SSMSQLSERVER, sqlexpress and uploaded mdf and idf file in the file system but still the setup is not working on my friend laptop and also change the connectionString but still the error keep coming when I run the setup.

A network - related or instance-specific error occured 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 sqlserver is configured to allow remote connection. (provider Sql Network interfaces, error; 26 -Error Locating Server/Instance Specified)


App.Config ConnectionString

                    connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Attey.mdf;Integrated Security=True"
            providerName="System.Data.SqlClient" />


Class ConnectionStrng that reference varrious pages for data input and retrieval in the application

 public string MyConnection()
            con = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Atteys.mdf;Integrated Security=True";
            return con;

Answers (8)