zoukankan      html  css  js  c++  java
  • WCF

    1. 在服务 Transfer 实现的协定列表中找不到协定名称 "IMetadataExchange"

    将 ServiceMetadataBehavior 添加到配置文件或直接添加到 ServiceHost,以启用对该协定的支持

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
      </startup>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="exposeExceptionDetail">
              <serviceMetadata />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <bindings>
          <netTcpBinding>
            <binding name="NetTcpBinding_ITransfer">
              <security mode="None"/>
            </binding>
          </netTcpBinding>
        </bindings>    
        <services>
          <service name="TestWcfScreen.Transfer"
                   behaviorConfiguration="exposeExceptionDetail">
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:8733/Transfer/" />
              </baseAddresses>
            </host>
            <endpoint address="" 
                      binding="netTcpBinding" 
                      bindingConfiguration="NetTcpBinding_ITransfer"
                      contract="TestWcfScreen.ITransfer">
            </endpoint>
            <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
          </service>
        </services>
      </system.serviceModel>
    </configuration>

    忘记添加 <serviceMetadata /> 这个标签

  • 相关阅读:
    网络安全协议(1)
    CG-CTF(6)
    CG-CTF(5)
    CG-CTF(4)
    CG-CTF(3)
    MAC地址欺骗(原理及实验)
    CG-CTF(2)
    CG-CTF(1)
    【转载】Spring Boot【快速入门】2019.05.19
    【编程大系】Java资源汇总
  • 原文地址:https://www.cnblogs.com/androllen/p/6911369.html
Copyright © 2011-2022 走看看