2017-10-25 10 views
0

우분투 (17.04)에 SQL Server를 설치했는데 완벽하게 작동합니다. Jetbrains Rider를 사용하여 C# 개발 작업을하고 Jetbrains Rider와 함께 Database 도구를 통해 로컬 SQL Server 인스턴스에 연결할 수 있습니다. Jetbrains SQL Server 우분투 라이더 연결 문자열

enter image description here

그러나 I'am 내 응용 프로그램에서 같은 DB에 연결을 시도 할 때 다음과 같은 오류를 제기한다

. 다음

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: TCP Provider, error: 25 - Connection string is not valid) ---> System.Net.Sockets.SocketException (0x80004005): Success

내가와 연결을 시도, 내 appsettings.json 파일

"ConnectionStrings": { 
"DefaultConnection": "Data Source=localhost\\sqlexpress:1433;Database=MyDb;User Id=SA;Password=MyPasswd;" 

} 내 연결 문자열 밖으로 포트 번호 대신 "데이터베이스"의 "초기 카탈로그" 연결 문자열에서도 마찬가지입니다.

어떻게 연결 문자열을 올바르게 설정할 수 있습니까?

+0

이 튜토리얼은 당신을 도울 수 있습니다 : https://blog.jetbrains.com/datagrip/2016/06/21/connecting-datagrip-ms-sql-server / – moscas

답변

0

나는 동일한 문제를 가지고 있으며 docker에서 linux 버전의 SQL Server가 포트 1401에서 자체를 노출한다는 것을 알았습니다 !! 당신이 라이더 쪽에서 잘 연결하는 것처럼 보이지만 내 이슈 인듯한 표준 1433이 아닙니다 .. 이상한