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>
     全址:终结点是否有全址? 终结点中的全址 :基址+终结点中的相对地址
  • 相关阅读:
    Blazor使用Chrome远程调试
    Blazor登录Ids4
    Jenkins + Coding 构建 Docker Image 并自动上传至Docker Registry
    EFK 数据生命周期
    EFK (Elasticsearch + Fluentd + Kibana) 日志分析系统
    通过Nginx代理Grafana,并通过域名访问
    Prometheus搜集mysql和nginx log指标
    java 线程相关(4)
    java 并发相关(5)
    java 线程相关(3)
  • 原文地址:https://www.cnblogs.com/lihongchen/p/3607902.html
Copyright © 2011-2022 走看看