0

I'm new to network computing. I am trying to build an ASP .NET database connection string. I have an Application windows 2012 server VM and an SQL windows 2012 server VM. My AD user is Administrator with a password. I have windows authentication turned on. Here is my connection string and VM information:

Domain: SQL.com

DB VM server computer name: win-5c3qtg1rebc.sql.com

From the Application server VM I can ping this computer name for the SQL VM: win-5c3qtg1rebc

ASP .NET connection string: @"Data Source=win-5c3qtg1rebc;Initial Catalog=KML;Integrated Security=SSPI"

When I run my application from Visual Studio I get the error:

"System.Data.SqlClientSqlException: 'A network-related or instance-specific error occurred while establishing a connection to SQL server. The server was not found or was not accessible."

Can someone look at my connection string and see what the problem is?

Thanks in advance.

holdorfs
  • 41
  • 7
  • did you try changing the datasource to include .sql.com? – Z . Jul 31 '20 at 18:35
  • I tried both ways. I can only ping the computer name without the domain information. – holdorfs Jul 31 '20 at 18:47
  • Here is a similar thread you can refer to. [How can I connect to SQLServer running on VirtualBox from my host Macbook](https://stackoverflow.com/questions/37616521/how-can-i-connect-to-sqlserver-running-on-virtualbox-from-my-host-macbook) – Jack J Jun Aug 03 '20 at 09:05

0 Answers0