We have setup our VPN connection in Azure to our on-premises database, the connect is working with no problems. I have written a MVC app that tries to connect to our on-premise database in SQL Server and am getting the following error:
System.Data.SqlClient.SqlException (0x80131904): 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.
The connection string I am using is:
name="productdbConnectionString" connectionString="Data Source=172.16.x.xx,1433;Initial Catalog=productdb;User Id=poppy;Password=poppyxxxxx" providerName="System.Data.SqlClient"
I have opened TCP and named pipes and I am using port 1433 in the connection string so am a bit confused why I cannot access the database?