zoukankan      html  css  js  c++  java
  • WCF寻址

    1.如果在<System.ServiceModel>.<Services>.<Service>.<host>.<baseaddress>定义了基址那么寻址有以下几种情况

     1 第三个终结点定义指定一个绝对地址,如下面的示例配置所示。
     2 <endpoint address="http://localhost:8001/hello/servicemodelsamples"
     3           binding="wsHttpBinding"
     4           contract="Microsoft.ServiceModel.Samples.ICalculator" />
     5 
     6 !-- The relative address specified: use the base address -->
     7 <!-- provided by the host + path. The endpoint address is -->
     8 <!-- http://localhost:8000/servicemodelsamples/service/test. -->
     9 <endpoint address="/test"
    10           binding="wsHttpBinding"
    11           contract="Microsoft.ServiceModel.Samples.ICalculator" />

    在终结点还可以指定一个绝对地址和一个不同的传输协议 (TCP)。基址在地址中不起作用。实际终结点地址为 net.tcp://localhost:9000/servicemodelsamples/service。
    <!-- The absolute address specified, different transport: -->
    <!-- use the specified address, and ignore the base address. -->
    <!-- The endpoint address is -->
    <!-- net.tcp://localhost:9000/servicemodelsamples/service. -->
    <endpoint address=
              "net.tcp://localhost:9000/servicemodelsamples/service"
              binding="netTcpBinding"
              contract="Microsoft.ServiceModel.Samples.ICalculator" />
    </service>
     全址:终结点是否有全址? 终结点中的全址 :基址+终结点中的相对地址
  • 相关阅读:
    .net学习笔记----WebConfig常用配置节点介绍
    .net学习笔记----会话状态Session
    .net学习笔记---HttpRuntime类
    最优化基础(三)
    最优化基础(二)
    最优化基础(一)
    非精确线搜索
    精确线搜索——抛物线法
    Matlab自定义函数的几种方法
    精确线搜索-黄金分割法
  • 原文地址:https://www.cnblogs.com/lihongchen/p/3607902.html
Copyright © 2011-2022 走看看