1
this 설명서에 따라 개발 한 Managed Windows Service에서 호스팅되는 WCF 서비스가 있습니다. 나는이 방법으로 서비스에 연결 클라이언트에서관리되는 Windows 서비스에서 호스팅되는 WCF 서비스에 다른 컴퓨터에서 액세스 할 수 없습니다.
<service name="Inpas.Unipos.LicenseManager.SamService.Service"
behaviorConfiguration="SamServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/SamService/service"/>
</baseAddresses>
</host>
<endpoint address=""
binding="wsHttpBinding"
contract="Inpas.Unipos.LicenseManager.SamService.IService" />
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
:의 App.config에서 나는 다음과 같은 규정이 잘 작동 로컬 컴퓨터에서
public void ConnectToService(string host, string port)
{
var binding = new WSHttpBinding();
var endpoint = new EndpointAddress(string.Format("http://{0}:{1}/SamService/service", host, port));
var channelFactory = new ChannelFactory<IService>(binding, endpoint);
_client = channelFactory.CreateChannel();
_client.Get2X2();
}
을, 그러나 나는 시도하는 경우에서 서비스에 연결 다른 컴퓨터 - 예외가 발생합니다.
EndpointNotFoundException 메시지 : 메시지를 수락 할 수있는 http://10.xx.xx.xx:8000/SamService/service에서 수신하는 끝점이 없습니다. 이것은 종종 잘못된 주소 또는 SOAP 조치로 인해 발생합니다.
내가 뭘 잘못하고 있니?
서비스 IE를 다른 상자에서 볼 수 있습니까? – Dhawalk
@Dhawalk 박스 란 무엇입니까? 그것을 확인하는 방법? – Zharro
다른 컴퓨터에서 ** 서비스 **의 주소로'http : // localhost : 8000/SamService/service'를 사용하고 있습니까? 그렇다면 주소를 컴퓨터 이름 (또는 도메인 이름) (예 : http://www.mydomain.com/)으로 변경해야합니다. "- localhost는 프로그램이 실행되는 컴퓨터를 나타냅니다. – Tim