• WCF configuration file


    WCF configuration file

     

    The configuration file in the host application follows the same format as the configuration file in the client application. There is a <bindings> section where the bindings are defined and a <service> section in which the endpoints (addresses and bindings) are defined.

     

    When defining endpoints in a configuration file the service name should be in the format of NAMESPACE.CLASSNAME, and the endpoint contract name should be in the format of NAMESPACE.INTERFACECLASS.

     

    In the preceding example, the service namespace is WCFService with a class name of ServiceClass, and the interface is named IServiceClass. Therefore the service and endpoints are defined in the configuration file as the following:

     

    <service name =”WCFService.ServiceClass”>

    <endpoint contract =”WCFService.IServiceClass”

    name=”NetTcpBinding_IServiceClass”

    binding =”netTcpBinding”

    address =”net.tcp://localhost:8000/TcpBinding”/>

    <endpoint contract =”WCFService.IServiceClass”

    name=”netNamedPipeBinding_IServiceClass”

    binding =”netNamedPipeBinding”

    address =”net.pipe://localhost/NetNamedPipeBinding”/>

    </service>

     

     

     

  • 相关阅读:
    Mybatis学习-ResultMap
    MySql模糊查询 concat()函数
    Spring学习-依赖注入
    Struts2学习-struts执行过程简述
    Struts2学习-jsp中超链接传参问题
    Struts2学习-struts.xml文件配置
    第四次作业
    第三次作业
    Django -Ajax
    Django -ORM
  • 原文地址:https://www.cnblogs.com/rickie/p/1050449.html
Copyright © 2020-2023  润新知