zoukankan      html  css  js  c++  java
  • WCF学习中遇到的几个问题

    基于IIS承载WCF Service时:

    <configuration>
      <system.serviceModel>
        <services>
          <service name="WcfService.MathService" behaviorConfiguration="MathServiceBehavior">
            <endpoint address="MathService" binding="wsHttpBinding" contract="WcfService.IMathService"></endpoint>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
          </service>      
        </services>    
        <behaviors>
          <serviceBehaviors>
            <behavior name="MathServiceBehavior">
              <serviceMetadata httpGetEnabled="true"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>

    </configuration> 

    红色标记处的name属性需要是服务实现类的完全限定名,否则会提示元数据交换被禁用。

    红色标记处的address属性值是wcf service的相对地址,与基地址组合后才是wcf service的真实地址。


  • 相关阅读:
    四则运算1
    四则运算3
    数组1
    四则运算单元测试
    四则运算2
    数组3
    数组2
    spring aop对service层日志和异常的处理
    Linux设置开机启动
    数据仓库开发——Kettle使用示例
  • 原文地址:https://www.cnblogs.com/seesky/p/2160078.html
Copyright © 2011-2022 走看看