2009-09-15 2 views
7

다음 오류가 발생하며 잘못된 것을 잘 모릅니다. 아무도 뚜렷한 것을 볼 수 있습니까? 다음은 ChannelFactory.Endpoint에 내 프로젝트의 web.config 내 WCF 클래스 라이브러리의의 App.configChannelFactory.Endpoint의 Address 속성이 null입니다. ChannelFactory의 끝점에 유효한 주소가 지정되어 있어야합니다.

주소 표시 속성은 null이었다된다. ChannelFactory의 끝점에는 유효한 주소가 지정되어 있어야합니다. (MY 클래스 라이브러리)

의 app.config ON 서버 웹 프로젝트에서

<system.serviceModel> 
    <services> 
     <service behaviorConfiguration="Default" name="Trezoro.WebAPI.Trade.TradeService"> 
     <endpoint address="" behaviorConfiguration="WebEPBehavior" binding="webHttpBinding" 
      contract="ITradeService" name="WebHttpBinding_ITradeService" /> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8080/tradeservice/" /> 
      </baseAddresses> 
     </host> 
     </service> 
     <service behaviorConfiguration="Default" name="Trezoro.WebAPI.Authentication.AuthService"> 
     <endpoint address="" behaviorConfiguration="WebEPBehavior" binding="webHttpBinding" 
      contract="IAuthService" name="WebHttpBinding_IAuthService" /> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8081/authservice" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <behaviors> 
     <endpointBehaviors> 
     <behavior name="WebEPBehavior"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 
     <serviceBehaviors> 
     <behavior name="Default"> 
      <serviceMetadata httpGetEnabled="True" /> 
      <serviceDebug includeExceptionDetailInFaults="True" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 

의 Web.config은

<system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> 

    <bindings> 
     <customBinding> 
      <binding name="WebHttpBinding_IAuthService"> 
      <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" 
       messageVersion="Soap12" writeEncoding="utf-8"> 
       <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
        maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      </textMessageEncoding> 
      </binding> 
      <binding name="WebHttpBinding_ITradeService"> 
      <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" 
       messageVersion="Soap12" writeEncoding="utf-8"> 
       <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
        maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      </textMessageEncoding> 
      </binding> 

     </customBinding> 
    </bindings> 
     <client> 
    <endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_IAuthService" 
    contract="IAuthService" name="WebHttpBinding_IAuthService" /> 
    <endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_ITradeService" 
    contract="ITradeService" name="WebHttpBinding_ITradeService" /> 
    </client> 
    </system.serviceModel> 

답변

10

클라이언트 엔드 포인트는 주소가 없습니다.

+0

쉽습니다! =) – burnt1ce

4

클라이언트 측 (소비 측)에 엔드 포인트 태그에 주소 속성을 추가하기 만하면됩니다.

관련 문제