2013-06-20 2 views
0

WCF Service LibraryVS2012에 만들고 내 로컬 IIS에로드했습니다.
클라이언트가 Windows-Mobile 6.5이고 클라이언트의 구성 파일이 netcfsvcutil.exe을 사용하여 생성되었습니다. 디버깅하는 동안 모든 것이 잘 작동했지만 외부에 서비스를 업로드 할 때 netcfsvcutil.exe 외부 URL에서 파일을 생성했지만 계속 There was no endpoint listening... 예외가 발생합니다. 내가 업로드 할 때 내가 어떤 구성을 변경하지 않은IIS에서 WCF 서비스 사용

public static System.ServiceModel.EndpointAddress EndpointAddress = 
    new System.ServiceModel.EndpointAddress("http://1.2.3.4/MyService/MyService.CollectionService.svc"); 

:

<system.serviceModel> 
<bindings> 
    <basicHttpBinding> 
    <binding name="TestBinding" receiveTimeout="00:01:00" sendTimeout="00:01:00"> 
     <security mode="None" /> 
    </binding> 
    </basicHttpBinding> 
</bindings> 
<services> 
    <service name="MyService.CollectionService"> 
    <endpoint address="" binding="basicHttpBinding" contract="MyService.ICollectionService" bindingConfiguration="TestBinding"> 
     <identity> 
     <dns value="localhost" /> 
     </identity> 
    </endpoint> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    <host> 
     <baseAddresses> 
     <add baseAddress="http://localhost:8733/Design_Time_Addresses/MyService/CollectionService/" /> 
     </baseAddresses> 
    </host> 
    </service> 
</services> 
<behaviors> 
    <serviceBehaviors> 
    <behavior> 
     <serviceMetadata httpGetEnabled="True" /> 
     <serviceDebug includeExceptionDetailInFaults="True" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

및 클라이언트 엔드 포인트는 다음과 같이 생성됩니다이 원격 서버에있는 web.config 파일입니다 서비스를 외부 IIS으로 보내면 간단히 & 파일을 하나의 가상 디렉터리에서 다른 가상 디렉터리로 붙여 넣을 수 있습니다. 몇 가지 도움이 될 수있는 것은 예외가 타임 아웃없이 발생한다는 것입니다.

답변

1

기본 주소 경로 및 포트가 클라이언트 구성의 엔드 포인트 주소와 일치하지 않습니다. 사용자의 설정에

주소 : 엔드 포인트에서 http://localhost:8733/Design_Time_Addresses/MyService/CollectionService/"

주소 :

당신은

public static System.ServiceModel.EndpointAddress EndpointAddress = new System.ServiceModel.EndpointAddress("http://1.2.3.4:8733/Design_Time_Addresses/MyService/CollectionService"); 
에 엔드 포인트 코드를 변경해야
http://1.2.3.4/MyService/MyService.CollectionService.svc 

관련 문제