2014-10-20 2 views
4

포트 8081을 사용하는 서비스를 시작하려고합니다. 서비스는 시작 직후에 중지됩니다. 나는 이벤트 뷰어에보고 난이 참조 :HTTP가 URL을 등록 할 수 없습니다.

Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL https:// +:8081/api/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'https:// +:8081/api/' because it conflicts with an existing registration on the machine.

내가 netsh를 함께 URL을 등록하려하지만 파일이 이미 있다고하지만, netsh를 HTTP (내가 예약을 삭제할 수 없습니다 그렇지 않은 예약 목록에 표시 show urlacl).

netsh http add urlacl url=http:// +:8081/api/ user=\Everyone 

Url reservation add failed, Error: 183 Cannot create a file when that file already exists.

netsh http delete urlacl url=https:// +:8081/api/ 

URL reservation delete failed, Error: 2 The system cannot find the file specified.

내가이 문제를 해결하기 위해 할 수있는 일이있다 ?

참고 : 서비스는 다른 컴퓨터에서 제대로 실행됩니다.

답변

4

add 명령의 http과 대조적으로 삭제 명령에 https 주소가 사용됩니다. 's'를 제거하면 제대로 작동합니다.

+0

에 등록했다 슬래시 놓쳤다 업 투표 나 또한 오타를했다/C b를이 답변 URL에서 나는 삭제하려고 노력했다. –

1

"+"는 사용하지 마십시오. 이 시도 :

netsh http add urlacl url=http://0.0.0.0:8081/api/ user=\Everyone 
1

삭제 명령은 정확한 일치해야합니다. show 명령을 사용하여 어떤 등록이 존재하는지 알아 내거나, 파일에 파이프하거나 grep하여 포트 번호를 입력하십시오.

netsh http show urlacl > d:\tmp\out.txt 

그럼 당신은 행복하게 내 경우에는

netsh http add urlacl url=theExactRegisteredUrl 

를 실행할 수 있습니다 난 뒤에 그것이

관련 문제