mexTcpBinding in WCF - IMetadataExchange errors

北城余情 提交于 2019-12-01 03:42:18

Well, if you want to have metadata - TCP or HTTP - you still need to include the serviceMetadata behavior!

<behaviors>
    <serviceBehaviors>
        <behavior name="WcfTcpTest.Service1Behavior">
            <serviceDebug includeExceptionDetailInFaults="True" />
            <serviceMetadata />
        </behavior>
    </serviceBehaviors>
</behaviors>

Sure, you can't have a "HttpGetEnabled" on it - but the behavior itself must be present in order to enable exchange of metadata (and thus the IMetadataExchange contract).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!