0

I write a project at ASP.NET and I use SQL server database. I use the class MyAdoHelper in order to connect and access my database from my aspx.cs file. I keep getting the next error when I try to use the function DoQuery from my aspx.cs:

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)

The error is at the line: conn.open();

CDspace
  • 2,639
  • 18
  • 30
  • 36
  • conn.Open uses the information in your connection string passed when you build the conn object. What is your connectionstring and it is valid for the server where the code executes? – Steve Dec 11 '17 at 20:42
  • refer to the duplicate, there are a lot of suggestions on where to look in the top 5 (or so) answers. – Igor Dec 11 '17 at 20:43

0 Answers0