【发布时间】:2015-08-21 18:45:29
【问题描述】:
错误显示:在服务“HelloService”实施的合同列表中找不到合同名称“IMetaDataExchange”。
我的 App.config 如下所示。为什么会这样,请指导我。
<services>
<service name="HelloService.HelloService" behaviorConfiguration="defaultBehavior">
<endpoint address="HelloService" binding="basicHttpBinding" contract="HelloService.IHelloService"></endpoint>
<endpoint address="HelloService" binding="netTcpBinding" contract="HelloService.IHelloService"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetaDataExchange"></endpoint>
<!--<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="mexBinding" contract="System.ServiceModel.Description.IMetadataExchange" />-->
<host>
<baseAddresses>
<add baseAddress="http://10.135.32.65:8080/"/>
<add baseAddress="net.tcp://localhost:8090/"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="defaultBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
【问题讨论】: