가능한 중복을 SQL 서버 2008를 연결할 수 없습니다 :
System.Data.SqlClient.SqlException A network-related or instance-specific error는 다른 컴퓨터에서
난 내 자신의 DB와 작업을 잘 내 현재 SQL 연결 문자열에 연결하는 C#에서의 WinForm 응용 프로그램이 is :
SqlConnection con = new SqlConnection("Data Source=ITPL_PC1;Initial Catalog=Data_Project;Persist Security Info=True;user id=sa;Password=insforia");
그러나이 winform을 다른 컴퓨터 i로 가져갈 때 내가 원격 액세스의 SQL 서버의 모든 설정을 변경 한
SqlConnection con = new SqlConnection("Data Source=192.168.0.28\\ITPL_PC1;Initial Catalog=Data_Project;Persist Security Info=True;user id=sa;Password=insforia");
하지만이 작동하지 않습니다 ...하지만 여전히 오류를 보여주는 : TS 작동하지 않습니다 .. 그럼 난에 내 연결 문자열을 변경하고
Sql Exception was unhandled
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)
내 연결 문자열이 잘못 되었나요? 그게 뭐야?
PLS는
예 내가 방화벽 설정 – Drone
을 변화했다 (나에게는 심지어 SQL 구성 관리자에서 TCP/IP를 사용하도록 설정 한 후 작동하지 않는) 수행 SQL Server 구성 관리자를 사용하여 TCP-IP 클라이언트 프로토콜을 활성화 했습니까? – Steve
그래, 덕분에 @ damien 나는 그것을 해결했다 – Drone