2011-04-06 6 views
1

.NET Framework 버전 3.5를 사용하여 Windows 서비스를 개발하고 있습니다. 원격 컴퓨터에서 웹 서비스를 호출해야하며 이상한 설치 문제가 발생합니다.사용자로 Windows 서비스를 설치하지 못했습니다.

나는 내 컴퓨터에 User (기본값)으로 설치하고, 로그인과 암호를 입력하라는 메시지가 나타나면 모든 것이 정상적으로 작동합니다. 그런 다음 어느 시점에서 작동이 멈췄으며 LocalSystem으로 설치하는 것으로 밝혀졌습니다.

는 지금은 원격 웹 서비스를 호출하기 위해 노력하고있어 나는 WCF에서 오류 받고 있어요 : 인해이없는 LocalSystem과 서비스를 (실행이 될 수있다, 분명히

There was no endpoint listening at https://www.remote.com/webservice.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 

을 인터넷 액세스) : There was no endpoint listening at <URI> that could accept the message. This is often caused by an incorrect address or SOAP action

따라서 서비스를 User으로 설치하고 자격 증명을 제공하는 것으로 전환하려고했습니다. (지금부터는 내 컴퓨터 관리자입니다.) 그러나 그것은 작동하지 않으며, 오류 메시지 (과 InstallUtil 로그 파일의 내용) 쓸모 옆에 있습니다

Running a transacted installation. 

Beginning the Install phase of the installation. 
See the contents of the log file for the Service.exe assembly's progress. 
The file is located at Service.InstallLog. 

An exception occurred during the Install phase. 
System.InvalidOperationException: An exception occurred in the OnAfterInstall event handler of System.ServiceProcess.ServiceInstaller. 
The inner exception System.InvalidOperationException was thrown with the following error message: Service ServiceName was not found on computer '.'. 
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: The specified service does not exist as an installed service. 

The Rollback phase of the installation is beginning. 
See the contents of the log file for the Service.exe assembly's progress. 
The file is located at Service.InstallLog. 

The Rollback phase completed successfully. 

The transacted install has completed. 

지금까지 내가 관련 비트가 서비스 설치에 실패한 것입니다 말할 수 있습니다. 더 이상 정보가 없습니다! 서비스가 LocalSystem으로 성공적으로 설치되지만 관리자 그룹의 구성원 인 User으로 설치하는 데 실패한 이유는 무엇입니까?

답변

1

사용자는 NetworkService입니다. LocalService는 보안상의 이유로 외부 세계에 연결할 수 없습니다.

서비스를 직접 설치할 수없는 이유는 UAC 때문일 수 있습니다. 귀하가 귀하의 계정 관리자 인 경우에도 UAC가 완전히 꺼져 있지 않으면 서비스 설치가 불가능하다는 사실을 발견했습니다. 귀하의 계정에이 특별 권한이 없기 때문입니다. 그룹 정책 관리자를 통해이 문제를 해결할 수 있다고 생각합니다.

+0

NetworkService로 설치하려고하면 다음 메시지와 함께 OnAfterInstall에 Win32Exception이 발생합니다. 액세스가 거부되었습니다. –

+0

나는 분명히해야한다 : 나는 NetworkService 사용자로서 서비스를 _run_ 의미했다. 특별한 권한을 가진 사용자로 설치해야합니다. 이 컴퓨터에서 UAC가 활성화되어 있습니까? –

+0

@Jonas : 예, Windows 7 상자이므로 UAC가 사용되고 있다고 생각합니다. 나는 Visual Studio Command Prompt ('Run as Administrator'로 연)에서 InstallUtil을 실행하고 있습니다. 이전에 NetworkService로 설치 한 내 의견은 적절하지 않습니다. 즉, ServiceProcessInstaller (즉, 실행할 계정)의 Account 속성이 NetworkService로 설정되어 있다는 것입니다. 또한 자동으로 시작되도록 설정되어 있음에 유의해야합니다 (수동으로 시작하도록 설정할 때도 동일한 문제가 발생 함). –

관련 문제