zoukankan      html  css  js  c++  java
  • 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.  囧

  • 相关阅读:
    c++控制台 设置字体颜色
    c 无回显读取字符/不按回车即获取字符
    C 汉字处理
    codeblocks 汉字乱码
    [转]C/C++获取当前系统时间
    锐捷认证的一些问题&解决方法
    JAVA之BigInteger(转)【转】【很好用啊】
    常用小函数——不要重复造轮子
    字符串的朴素模式和KMP模式匹配
    直接插入排序
  • 原文地址:https://www.cnblogs.com/malaikuangren/p/2552568.html
Copyright © 2011-2022 走看看