Hello Team,
Please I developed C# window Application with sqlserver management studio 18 and after deploying the application and I tried to install it on the user computer and this error came, 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)

Sachin SinghRank #66 · 26.2K reputationPosted May 1, 2022, 10:37 AM EDT
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Apr 24, 2022, 10:45 PM EDT
Uttam KumarRank #1,076 · 1.8K reputationPosted Apr 25, 2022, 10:01 PM EDT
From the error message it’s apparently not able to establish connection with sql server. Check the following
Sachin SinghRank #66 · 26.2K reputationPosted May 2, 2022, 3:40 PM EDT
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 3, 2022, 1:12 PM EDT
Hello Sachin,
I have tried all the steps you shown me and everyonce suggestion but nothing is working.
I even tried to install SSMSQLSERVER on the user computer but the system keep giving me the same error like
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)
I thought it is firewall that is blocking the sqlserver port and assign 1433 to the inbound port but it is still not working.
Please though SSMSQLSERVER was successfully installed and when I try to login then the error popup, but what could be blocking the sqlserver from working on the user computer though everything work fine on my laptop ?
Sam HobbsRank #107 · 20.5K reputationPosted Apr 27, 2022, 5:53 PM EDT
Ensure that SQL Server is executing. You can do that in many ways but since I currently do not have SQL Server installed in my system I cannot confirm how to do that. I assume the system has SQL Server Management Studio (SSMS) installed and you can use that to check on SQL Server. Otherwise there are many ways to look at and start services; SQL Server is a service.
I think you can use SSMS also to get the connection string.
Another way to get the connection string is to first create a text file with any name and then change the extension to udl. So in other words create cs.txt and rename it to cs.udl. Then open the file (double-click or whatever). A GUI will open that will make it easy to create a connection string. Then open the udl file using a text editor and you can copy the conmnection string from there.
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted Apr 30, 2022, 1:08 PM EDT
Thank you Kumar, Muhammad,and Sam but please my question is must I install SSMSQLSERVER on the user computer before my application can work because I thought I have published the C# application with the sqlserver
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 2, 2022, 2:25 PM EDT
Thank you Sachin, that is exactly the answer am looking for, but with the MDF file, what I can see now is [ Program Debug Databases], is it the same as MDF file
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 2, 2022, 2:36 PM EDT
Thank you Sachin,
That is exactly the answer am looking for, but with the MDF file, what I can see now is [ Program Debug Databases], is it the same as MDF file.
Sachin SinghRank #66 · 26.2K reputationPosted May 2, 2022, 2:47 PM EDT
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 2, 2022, 3:06 PM EDT
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 2, 2022, 3:26 PM EDT
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 2, 2022, 3:33 PM EDT
Sachin SinghRank #66 · 26.2K reputationPosted May 2, 2022, 3:40 PM EDT
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 4, 2022, 10:39 AM EDT
Emmmanuel FIADUFERank #947 · 2.2K reputationPosted May 4, 2022, 2:33 PM EDT