• How to publish metadata for WF serviceWeird problem.


    recently ,when i was coding a simple enought wf service program.

    i found a weird problem by using the Wcf test client tool.

    my wcf endpoint is  http://localhost:8000/WFServices

    but if i acess this address in my chrome.

    i got a message like this.



    The service page has some helpful tips to enable metadata for a WCF service.  Unfortunately the same tips do not apply to a WCF Workflow Service.  In previous releases of WCF you had to apply a service behavior using a named behavior configuration that applied to your service.  In .NET 4.0 or later you do not have to use a named behavior configuration and you don’t have to declare a <service> in your configuration file for more information on this see Simplified Configuration for WCF

    Most of the time when creating Workflow Services you will use the default service configuration without declaring a <service> tag in your config file.  Enabling service metadata then is a simple matter of adding the following configuration.

    <configuration>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="">
              <serviceMetadata httpGetEnabled="True"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
    </configuration>

    but there is a trap here . after you finish configuration you service .you must delete the all the files under the Debug folder . and press Ctrl + f5 to make the service work. otherwise you will got the same error too.  囧

  • 相关阅读:
    Java--泛型
    Java--文档注释
    Java--网络编程
    Java--序列化
    Java--多线程编程
    Java--ConcurrentHashMap原理分析
    HashMap底层实现原理/HashMap与HashTable区别/HashMap与HashSet区别
    面向接口编程详解
    面向接口编程
    base64 数据加密
  • 原文地址:https://www.cnblogs.com/malaikuangren/p/2552568.html
Copyright © 2020-2023  润新知