성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Reordering on an Alpha processor ;...
[정성태] 공유 감사합니다. ^^ 참고로, WPF에서 WindowsF...
[Tom Lee] 답변 감사합니다. 나름의 해결책 연구해보고 여기에도 공유해봅니다...
[정성태] 아래의 글을 보면, MoveWindow 하면 될 듯한데요. ^^...
[Tom Lee] 안녕하세요 올려주신 글 참고하여 WPF 어플리케이션 안에 Uni...
[정성태] A graphical depiction of the steps ...
[정성태] 질문을 주셔서 출판사 측에 문의를 했습니다. 약 한 달 정도 후...
[Thorondor
] @정성태 개인 블로그인데도 거의 커뮤니티 급 인 것 같아요. 요...
[정성태] Roll A Lisp In C - Reading ; https...
[정성태] Java - How to use the Foreign Funct...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>RDP ActiveX 컨트롤로 특정 PC에 연결할 수 없을 때, 오류 상황을 해결하기 위한 팁</h1> <p> 다음과 같은 질문이 있군요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > ActiveX Control을 이용해서 원격 접속 프로그램을 만드려고 하는데... ; <a target='tab' href='https://social.msdn.microsoft.com/Forums/ko-KR/762f47c8-bba9-47cb-b7af-12122395f09f/activex-control-?forum=visualcsharpko'>https://social.msdn.microsoft.com/Forums/ko-KR/762f47c8-bba9-47cb-b7af-12122395f09f/activex-control-?forum=visualcsharpko</a> </pre> <br /> 다음의 글을 이용해,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Remote Desktop using C#.NET ; <a target='tab' href='http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET'>http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET</a> </pre> <br /> C# Windows Forms 프로젝트를 만들어 "Microsoft Terminal Services Control Type Library 1.0"을 참조 추가하고, 비주얼 스튜디오의 도구 상자(Toolbox) 윈도우에서 마우스 우클릭해 COM 컨트롤을 추가했습니다. COM 컨트롤 추가 시의 ActiveX 컨트롤 이름은 "Microsoft RDP Client Control - version [번호]"로 나옵니다. (현재는 version 10이 가장 최신인 듯 합니다.)<br /> <br /> 그런 다음 간단하게 코드 작성하고 Connect 메서드를 호출했는데,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > rdp.Server = "...[Windows 10 PC의 IP 주소]..."; rdp.Connect(); </pre> <br /> 반응이 없습니다. 이럴 때 어떤 오류가 발생했는지 알아내고 싶다면 OnDisconnected 이벤트를 구독하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > private void button1_Click(object sender, EventArgs e) { rdp.Server = "...[Windows 10 PC의 IP 주소]..."; rdp.OnDisconnected += Rdp_OnDisconnected; rdp.Connect(); } private void Rdp_OnDisconnected(object sender, AxMSTSCLib.IMsTscAxEvents_OnDisconnectedEvent e) { string txt = rdp.GetErrorDescription((uint)e.discReason, (uint)rdp.ExtendedDisconnectReason); System.Diagnostics.Trace.WriteLine(txt); } </pre> <br /> 보는 바와 같이 GetErrorDescription을 호출해 주면 자세한 오류 메시지를 확인할 수 있는데, 이번 경우에는 다음과 같았습니다.<br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> e.discReason == 2825<br /> <br /> GetErrorDescription 반환: The remote computer requires Network Level Authentication, which your computer does not support. For assistance, contact your system administrator or technical support.<br /> </div><br /> <br /> 이 정도면 검색으로 충분히 오류 해결을 할 수 있습니다. ^^<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > TS Server with NLA enabled: mstsc.exe works, application with RDP ActiveX fails to connect ; <a target='tab' href='https://social.technet.microsoft.com/Forums/windowsserver/en-US/49147937-1921-4ac2-a60d-223628392396/ts-server-with-nla-enabled-mstscexe-works-application-with-rdp-activex-fails-to-connect?forum=winserverTS'>https://social.technet.microsoft.com/Forums/windowsserver/en-US/49147937-1921-4ac2-a60d-223628392396/ts-server-with-nla-enabled-mstscexe-works-application-with-rdp-activex-fails-to-connect?forum=winserverTS</a> </pre> <br /> 위의 글에 해결방법이 나오는데 다음과 같은 라인을 추가해 NLA(Network Level Authentication) 설정이 되어 있는 윈도우 운영체제에 연결할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > private void button1_Click(object sender, EventArgs e) { rdp.Server = "...[Windows 10 PC의 IP 주소]..."; <span style='color: blue; font-weight: bold'>rdp.AdvancedSettings7.EnableCredSspSupport = true;</span> rdp.OnDisconnected += Rdp_OnDisconnected; rdp.Connect(); } </pre> <br /> (<a target='tab' href='http://www.sysnet.pe.kr/bbs/DownloadAttachment.aspx?fid=1051&boardid=331301885'>첨부 파일은 이 글의 예제 코드를 포함</a>합니다.)<br /> <br /> <hr style='width: 50%' /><br /> <br /> 오류 코드 하나 더 추가.<br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> e.discReason == 1033<br /> <br /> GetErrorDescription 반환: The connection cannot proceed because authentication is not enabled and the remote computer requires that authentication be enabled to connect.<br /> </div><br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1258
(왼쪽의 숫자를 입력해야 합니다.)