2013-09-02 3 views
0

입니다.이 모든 경우에 http를 사용하고 있는데 net.tcp와 함께 작업 할 때 참조를 추가 할 때바인딩 NetTcpBinding이있는 엔드 포인트에 대해 구성표 net.tcp와 일치하는 기본 주소를 찾을 수 없습니다. 등록 된 기본 주소 체계는 [http]

과 같은 오류가 발생합니다.

일치하는 기본 주소를 찾을 수 없습니다 바인딩 NetTcpBinding이있는 엔드 포인트의 net.tcp 체계. 등록 된 기본 주소 체계는 [http]입니다.

내 Web.config의

<?xml version="1.0"?> 
<configuration> 

    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <services> 
     <service behaviorConfiguration="servicebehave" name="WcfServ.Service1"> 
     <endpoint address="" binding="netTcpBinding" 
      bindingConfiguration="" name="nettcp" contract="WcfServ.IService1" /> 

     <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" 
      name="mex" contract="IMetadataExchange" /> 
     <host> 
      <baseAddresses> 
      <add baseAddress="net.tcp://localhost:51560/Service1.svc" /> 
      <add baseAddress="http://localhost:8080/Service1.svc"/> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <bindings> 
     <netTcpBinding> 
     <binding name="netTcpBinding"> 
      <security mode="Transport" /> 
     </binding> 
     </netTcpBinding> 

    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="servicebehave"> 
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="false"/> 
      <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 

     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" /> 
    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 

</configuration> 

내가 잘못하고있는 중이 야 어디 사람이 말해 줄래?

+0

당신 뿌리고 환경은 무엇입니까? – Alex

+0

IIS 6.0이지만 서비스를 추가 할 때 오류가 발생합니다. –

답변

1

IIS 6에서 net.tcp를 호스팅 할 수 없으며 HTTP 만 지원합니다. 따라서 HTTP 바인딩 (기본, ws 또는 2007)으로 만 제한됩니다. net.tcp 및 다른 프로토콜을 제공하려면 WAS가 필요합니다. 독립 실행 형으로 활성화 할 수 있지만 IIS 7이 편리한 서비스 관리 플랫폼을 추가로 제공하기 때문에 IIS 7 (일부로 설치됨)과 함께 설치하는 것이 좋습니다.

또 다른 솔루션은 TCP 호스트 프로토콜을 지원하는 ServiceHost 클래스 인스턴스를 사용하여 자체 호스팅 또는 서비스 호스팅되도록 호스팅 환경을 변경합니다.

+0

어쩌면 그는 끝점에 주소를 지정해야하며 baseAddress를 수정하는 빈 문자열이 아닐 수도 있습니다. –

+0

@FrancescoDeLisi 아니요, 필수 사항은 아닙니다. 두 개의 엔드 포인트는 서로 다른 프로토콜을 사용하는 경우 동일한 상대 주소를 가질 수 있습니다. 비록 그들이 비어있다하더라도 - "" – Alex

+0

하지만 나는 서비스를 호스팅하지 않습니다. 나는 클라이언트에 대한 참조를 추가하는 중입니다. 오류가 발생하면 어떻게 제거 할 수 있습니까 ?? –

관련 문제

 관련 문제