Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (seongtaejeong at gmail.com)
홈페이지
첨부 파일
 

Typed DataSet 생성 중 "Failed to open a connection to the database" 오류

오랜만에 typed dataset을 테스트했는데 "Data Source Configuration Wizard"의 "Choose Your Data Connection" 단계에서 이런 오류가 발생하는군요.

xsd_failed_auth_1.png

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" 버튼을 눌러도 잘 통과하게 됩니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 5/3/2025]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... [61]  62  63  64  65  66  67  68  69  70  71  72  73  74  75  ...
NoWriterDateCnt.TitleFile(s)
12459정성태12/16/202020874Linux: 35. C# - 리눅스 환경에서 클라이언트 소켓의 ephemeral port 재사용파일 다운로드1
12458정성태12/16/202017924오류 유형: 694. C# - Task.Start 메서드 호출 시 "System.InvalidOperationException: 'Start may not be called on a task that has completed.'" 예외 발생 [1]
12457정성태12/15/202019288Windows: 185. C# - Windows 10/2019부터 추가된 SIO_TCP_INFO파일 다운로드1
12456정성태12/15/202020389VS.NET IDE: 156. Visual Studio - "Migrate packages.config to PackageReference"
12455정성태12/15/202019867오류 유형: 693. DLL 로딩 시 0x800704ec - This Program is Blocked by Group Policy [1]
12454정성태12/15/202020234Windows: 184. Windows - AppLocker의 "DLL Rules"를 이용해 임의 경로에 설치한 DLL의 로딩을 막는 방법 [1]
12453정성태12/14/202021345.NET Framework: 984. C# - bool / BOOL / VARIANT_BOOL에 대한 Interop [1]파일 다운로드1
12452정성태12/14/202021681Windows: 183. 설정은 가능하지만 구할 수는 없는 TcpTimedWaitDelay 값
12451정성태12/14/202018884Windows: 182. WMI Namespace를 열거하고, 그 안에 정의된 클래스를 열거하는 방법 [5]
12450정성태12/13/202020253.NET Framework: 983. C# - TIME_WAIT과 ephemeral port 재사용파일 다운로드1
12449정성태12/11/202021304.NET Framework: 982. C# - HttpClient에서의 ephemeral port 재사용 [2]파일 다운로드1
12448정성태12/11/202022953.NET Framework: 981. C# - HttpWebRequest, WebClient와 ephemeral port 재사용파일 다운로드1
12447정성태12/10/202021143.NET Framework: 980. C# - CopyFileEx API 사용 예제 코드파일 다운로드1
12446정성태12/10/202022256.NET Framework: 979. C# - CoCreateInstanceEx 사용 예제 코드파일 다운로드1
12445정성태12/8/202016877오류 유형: 692. C# Marshal.PtrToStructure - The structure must not be a value class.파일 다운로드1
12444정성태12/8/202018975.NET Framework: 978. C# - GUID 타입 전용의 UnmanagedType.LPStruct [1]파일 다운로드1
12443정성태12/8/202018029.NET Framework: 977. C# PInvoke - C++의 매개변수에 대한 마샬링을 tlbexp.exe를 이용해 확인하는 방법
12442정성태12/4/202017666오류 유형: 691. Visual Studio - Build Events에 robocopy를 사용할때 "Invalid Parameter #1" 오류가 발행하는 경우
12441정성태12/4/202016157오류 유형: 690. robocopy - ERROR : No Destination Directory Specified.
12440정성태12/4/202018487오류 유형: 689. SignTool Error: Invalid option: /as
12439정성태12/4/202021196디버깅 기술: 176. windbg - 특정 Win32 API에서 BP가 안 걸리는 경우 (2) [1]
12438정성태12/2/202019048오류 유형: 688. .Visual C++ - Error C2011 'sockaddr': 'struct' type redefinition
12437정성태12/1/202019725VS.NET IDE: 155. pfx의 암호 키 파일을 Visual Studio 없이 등록하는 방법
12436정성태12/1/202020114오류 유형: 687. .NET Core 2.2 빌드 - error MSB4018: The "RazorTagHelper" task failed unexpectedly.
12435정성태12/1/202027944Windows: 181. 윈도우 환경에서 클라이언트 소켓의 최대 접속 수 (4) - ReuseUnicastPort를 이용한 포트 고갈 문제 해결 [1]파일 다운로드1
12434정성태11/30/202021647Windows: 180. C# - dynamicport 값의 범위를 알아내는 방법
... [61]  62  63  64  65  66  67  68  69  70  71  72  73  74  75  ...