【发布时间】:2016-05-07 22:43:51
【问题描述】:
我正在开发一个 WCF 应用程序,其绑定必须是“netTcpBinding”,但是当我在 Visual Studio 2013 中运行它时,我收到此错误“无法获取元数据 http://localhost:62081 / Queue.svc”。我像以前一样进行了激烈的搜索,但没有找到工作的例子。我想了解这是如何工作的。谢谢!!!您将在下面找到我的网络配置:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="QueueBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="QueueBehavior" name="ComponenteCola.Queue">
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
name="QueueNetTcpEndPoint" contract="ComponenteCola.IQueue" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
name="NetTcpMetadataPoint" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:57965/Queue" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
【问题讨论】:
标签: c# wcf visual-studio-2013 wcf-binding nettcpbinding