Typed DataSet 생성 중 "Failed to open a connection to the database" 오류
오랜만에 typed dataset을 테스트했는데 "Data Source Configuration Wizard"의 "Choose Your Data Connection" 단계에서 이런 오류가 발생하는군요.

Failed to open a connection to the database
"A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)"
Check the connection and try again.
원인은, 위의 화면에서 선택한 "Yes, include sensitive data in the connection string." 옵션이 자동으로 생성해 주는 연결 문자열에 "
Encrypt=True"가 들어 있기 때문입니다.
Data Source=.\SQLEXPRESS;Persist Security Info=True;User ID=sa;Password=testpw;Encrypt=True
어쩔 수 없습니다, 해당 대화창의 "Which data connection should your application use to connect to the database?" 콤보 상자에서 나열한 연결 문자열 항목을 선택하는 대신 "New Connection..." 버튼을 눌러 나오는 화면에서 "Encrypt"를 선택하더라도 "
Trust Server Certificate" 옵션을 함께 켜 주시면 됩니다.
그럼 "Show the connection string that you will save in the application"에 다음과 같이 "Trust Server Certificate=True" 옵션이 함께 나오고,
Data Source=.;Initial Catalog=UnitTestDB2;Integrated Security=True;Trust Server Certificate=True
"Next" 버튼을 눌러도 잘 통과하게 됩니다.
[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]