I have a local SQL Server database setup on a Dell R720 running Windows Server 2012 R2 and I am developing an ASP.NET site. I am able to connect to the database and pull in objects and queries and everything EXCEPT when I try to pull in the login tool.
I was following a tutorial on creating a login page and they suggested pulling in this tool, and clicking the login button which will prompt visual studio to create a new database with a bunch of tables in it, which they did successfully in the video but when I try it, I get this response:
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)
Here is my web.config
file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="SOSiQConnectionString"
connectionString="Data Source=KINGDOM_NETWORK;Initial Catalog=SOSiQ;Integrated Security=true;"
providerName="System.Data.SqlClient" />
<!-- commented this out testing the connection
<add name="SOSiQConnectionString1"
connectionString="Data Source=localhost\;Initial Catalog=SOSiQ;Integrated Security=True"
providerName="System.Data.SqlClient" /> -->
</connectionStrings>
Visual studio code showing SQL Server database connection
PS, I have searched google for days looking for a solution. Everybody suggests making sure that you have remote connections enabled and firewall/ports. I've done all that to no avail, but, in my mind it shouldn't matter because A. I am on the machine that has the SQL Server database and B. I can access the database from my project in Visual Studio.