This has been plaguing me for the last few hours, I’m recieving the following error message on an ASP.NET web page:
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)
In the past to fix this I’ve found it was a simple connection string error, however I’m using Idera’s Connection String generator tool. It seems to be able to connect to the server just fine when I test the string. I can connect with SQL Management Studio, as well as I can create a blank .udl file, fill in the details, and it connects without issue.
I’ve double checked, and the server is allowing remote connections, I turned the firewall off at this point (just trying to get this to work) and still no go.
Do you guys think I’m missing something ? Any help is GREATLY appreciated!
And when you try adding a connection from Visual Studio ?
You could also use the connection string that is generated by VS while doing this.
It seems as if you are missing the instance name or something like that.
Edit : Yes, as explained in the comment : Right click the connection, then copy the Connection string.
But you might have to replace the “name” by the IP address, if the resolution of the host name is not being performed correctly