在我的配置我的詳細地址如下net.tcp://127.0.0.1:1127/CalculatorService but when the error message is showing Cannot obtain Metadata from http://localhost:12659
無法從HTTP獲取元數據://本地主機:12659
我有簡單的服務,TCP綁定和我從VS2010 IDE與WCF測試客戶端上運行我的服務,然後我正在此錯誤無法從http://localhost:12659
這裏獲取元數據是我的配置文件的詳細信息
<?xml version="1.0"?>
<!--Copyright (c) Microsoft Corporation. All Rights Reserved.-->
<configuration>
<system.serviceModel>
<services>
<service name="MyTcpActivation.CalculatorService" behaviorConfiguration="CalculatorServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="net.tcp://127.0.0.1:1127/CalculatorService/"/>
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding" bindingConfiguration="PortSharingBinding"
contract="MyTcpActivation.ICalculator"/>
<endpoint address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="PortSharingBinding" 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" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.web>
<compilation debug="true"/></system.web>
</configuration>
請幫我從WCF測試客戶端上運行我的服務來自VS2010 IDE。謝謝
我在WCF是新的。我檢查了Net Tcp Listener Service已啓動。我沒有託管在IIS或WAS中。我只是從VS2010 IDE開始測試的服務。所以當我從IDE運行我的服務時,爲什麼我需要啓動WAS。當我用IDE的httpbinding運行我的服務時,沒有問題發生。所以引導我做什麼。告訴我,當我不會部署到WAS時,總是需要啓動WAS。 – Thomas
我提到我的端口1127,但在錯誤消息中端口號顯示12659爲什麼?你能告訴我爲什麼這麼有線的行爲。謝謝 – Thomas
我的服務經理中沒有找到任何名爲WAS的服務。 – Thomas