• WCF tcpTrace.exe配置


    Web.config

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="metadataBehavior">
              <serviceMetadata httpGetEnabled="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        
        <services>
          <service behaviorConfiguration="metadataBehavior" name="Services.CalculatorService">
            <endpoint binding="wsHttpBinding" contract="Contracts.ICalculator" />
          </service>
        </services>
        
      </system.serviceModel>
        <system.web>
            <authentication mode="Forms" />
        </system.web>
    </configuration>

    Clent App.config

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <system.serviceModel>
          <behaviors>
            <endpointBehaviors>
              <behavior name="calculatorEndpointBehavior">
                  <clientVia viaUri="http://localhost:100/CalculatorService.svc" />
              </behavior>
            </endpointBehaviors>
          </behaviors>
            <bindings>
                <wsHttpBinding>
                    <binding name="WSHttpBinding_CalculatorService" closeTimeout="00:01:00"
                        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                        bypassProxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                        useDefaultWebProxy="true" allowCookies="false">
                        <security>
                            <transport realm="" />
                        </security>
                    </binding>
                </wsHttpBinding>
            </bindings>
            <client>
                <endpoint address="http://localhost:96/CalculatorService.svc" behaviorConfiguration="calculatorEndpointBehavior" binding="wsHttpBinding"
                    bindingConfiguration="WSHttpBinding_CalculatorService" contract="ServiceReference1.CalculatorService"
                    name="WSHttpBinding_CalculatorService">
                    <identity>
                        <servicePrincipalName value="host/it10" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>
    </configuration>

    IIS中把配置站点端口为96

    tcpTrace配置

    Listen on Port # : 100
    Destination Server: localhost
    Destination Port# :96

    WCF.rar
    tcpTrace.rar



    签名:删除冗余的代码最开心,找不到删除的代码最痛苦!
  • 相关阅读:
    jichu
    scanf
    数位dp
    hdu 5667
    华东交通大学2018年ACM“双基”程序设计竞赛 K
    华东交通大学2018年ACM“双基”程序设计竞赛 D
    map
    次小生成树
    set
    c++11之为什么C++11引入了std::ref?
  • 原文地址:https://www.cnblogs.com/season2009/p/3454123.html
Copyright © 2020-2023  润新知