wcf.i의 새 기능입니다. add, subtract, muliply, division 등의 계산기와 같은 간단한 wcf 서비스가 있습니다. 서비스 구성 파일에 두 개의 끝점이 있습니다. 하나는 basicHttpBinding이고 다른 하나는 netTcpBinding입니다. f5를 누른 다음 wcf 테스트 클라이언트가 나타나서 오류 wcf가 서비스를 추가하지 못했음을 나타냅니다. 서비스 메타 데이터에 액세스 할 수없는 경우 netTcpBinding에 대한 netTcpBinding 및 mex를 해제하고 f5를 누르면 wcf 테스트 클라이언트가 서비스를 호출 할 수 있습니다. 여기에 내 config 항목이 있습니다. 그래서 좀 봐주세요 그리고 왜 내가 netTcpBinding에 대한 오류가 발생하고 그것을 해결하는 방법을 말해.wcf가 서비스를 추가하지 못했습니다. 서비스 메타 데이터에 액세스 할 수 없을 수도 있습니다.
<?xml version="1.0"?>
<!--Copyright (c) Microsoft Corporation. All Rights Reserved.-->
<configuration>
<system.serviceModel>
<services>
<service name="MyTcpActivation.CalculatorService" behaviorConfiguration="CalculatorServiceBehavior">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="PortSharingBinding"
contract="MyTcpActivation.ICalculator"/>
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
<endpoint address="" binding="basicHttpBinding" contract="MyTcpActivation.ICalculator" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="" portSharingEnabled="true">
<security mode="None"/>
</binding>
</netTcpBinding>
</bindings>
<!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.web>
<compilation debug="true"/></system.web></configuration>
구성 파일에서 수정해야 할 부분을 안내해주세요. 결과적으로 사용하는 바인딩에 문제가 없어야합니다. 감사합니다
이 http://stackoverflow.com/questions/8957158/cant-add-service-reference-to-net-tcp-wcf-service – Thomas