성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
글쓰기
제목
이름
암호
전자우편
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'>NT 서비스가 시작하자마자 디버거를 연결시키는 방법 (1)</h1> <p> NT 서비스를 시작하자마자 오류가 발생하면서 프로세스가 죽어버리는 경우 디버깅 방법이 난감합니다. 더욱이 덤프를 남겨 분석해도 원인 파악이 힘들 때는 Visual Studio로 실행 시에 attach 시키는 것을 고려해 볼 수 있는데요.<br /> <br /> 이런 때 사용할 수 있는 옵션이 레지스트리의 "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" 설정입니다. 예를 들어 아래의 화면에서처럼,<br /> <br /> <img alt='nt_service_startup_debug_1.png' src='/SysWebRes/bbs/nt_service_startup_debug_1.png' /> <br /><br /> "SSRS(SQL Server Reporting Services)"에 해당하는 프로세스 파일명인 "ReportingServicesService.exe"로 키를 등록하고 하위에 다음과 같은 형식의 Debugger 값을 등록해 주면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 이름: Debugger 형식: REG_SZ 값: "[... Visual Studio 설치 폴더 ...]\devenv.exe" /debugexe </pre> <br /> 이렇게 하고 서비스 관리자에서 ReportServer를 시작해 주면 SCM(Service Control Manager)은 "Image File Execution Options"에 등록된 설정에 따라 devenv.exe를 다음과 같이 실행시켜줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > "[Visual Studio 설치 폴더]\devenv.exe" /debugexe "[SQL Server 설치 폴더]\ReportingServicesService.exe" </pre> <br /> 그런데, 정작 SSRS 서비스 시작은 다음과 같은 오류 창을 내뱉으면서 동작을 안합니다.<br /> <br /> <img alt='nt_service_startup_debug_2.png' src='/SysWebRes/bbs/nt_service_startup_debug_2.png' /> <br /><br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Windows could not start the SQL Server Reporting Services (MSSQLSERVER) service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion. </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;' > Debugging startup code of services and COM servers ; <a target='tab' href='http://www.debuginfo.com/articles/debugstartup.html'>http://www.debuginfo.com/articles/debugstartup.html</a> </pre> <br /> 아하~~~ 잊고 있었군요. 서비스가 별도의 데스크톱 자원에서 실행되고 있다는 것을! ^^ 따라서 다음과 같이 임시로 "Local SYSTEM"으로 변경하고 "Allow service to interact with desktop" 옵션을 설정해 주었습니다.<br /> <br /> <img alt='nt_service_startup_debug_3.png' src='/SysWebRes/bbs/nt_service_startup_debug_3.png' /> <br /><br /> 하지만, 이렇게 변경해도 윈도우 8에서는 여전히 SSRS 서비스에 타임아웃 오류가 발생합니다. 이벤트 로그를 보면 다음의 항목으로 원인이 나옵니다.<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'> Log Name: System<br /> Source: Service Control Manager<br /> Date: 2014-01-13 오후 10:35:19<br /> Event ID: 7030<br /> Task Category: None<br /> Level: Error<br /> Keywords: Classic<br /> User: N/A<br /> Computer: testpc<br /> Description:<br /> The SQL Server Reporting Services (MSSQLSERVER) service is marked as an interactive service. However, the system is configured to not allow interactive services. This service may not function properly.<br /> </div><br /> <br /> 이 문제를 해결하려면 서비스 관리자에서 "Interactive Services Detection" 서비스를 시작해 둡니다. <br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 윈도우 8에서 "Interactive Services Detection" 서비스 시작하는 방법 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/1583'>http://www.sysnet.pe.kr/2/0/1583</a> </pre> <br /> 자... 다시 SSRS 서비스를 시작해 볼까요? 그럼, 지난번 글에 설명한 것처럼 작업 표시줄에 아이콘이 깜빡이고 그것을 누르면 세션 0 데스크톱 화면으로 전환됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 윈도우 8 - UI가 있는 프로그램을 Local SYSTEM 권한의 세션 0 데스크톱에서 실행하는 방법 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/1584'>http://www.sysnet.pe.kr/2/0/1584</a> </pre> <br /> 세션 0 데스크톱 화면을 보면, 아쉽게도 Visual Studio가 제대로 실행되지 않아 아래와 같이 특정 영역만 그려진 상태로 출력이 됩니다.<br /> <br /> <img onclick='toggle_img(this)' class='imgView' alt='nt_service_startup_debug_4.png' src='/SysWebRes/bbs/nt_service_startup_debug_4.png' /><br /> <br /> 그리곤 서비스 시작 time-out이 걸리면서 devenv.exe 프로세스가 내려가 버립니다.<br /> <br /> 휴~~~ 이대로 포기해야 하는 걸까요? ^^<br /> </p><br /> <br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
7530
(왼쪽의 숫자를 입력해야 합니다.)