zoukankan      html  css  js  c++  java
  • WCF配置文件结构

    WCF配置文件结构:

    <system.serviceModel>
      
    <!--服务器端WCF服务配置-->
        
    <services>
          
    <!--使用配置文件启动元数据交换行为,这样就可以在浏览器中通过配置的地址进行访问-->
          
    <service behaviorConfiguration="TestBehavior" name="NameSpace.TestClass">
            
    <!--
            终结点:终结点由地址、绑定、契约有关,地址定义了服务的位置,绑定定义了服务通信的方式,契约定义了服务的内容
            address为空则表示使用基地址
            使用配置文件可以为终结点使用的绑定进行定制,即添加 bindingConfiguration 属性,它的值应与<bindings>配置节中定制的绑定名一致
            
    -->
            
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITest" contract="NameSpace.ITestInterface">
              
    <identity>
                
    <!--只允许本地调用-->
                
    <dns value="localhost"/>
              
    </identity>
            
    </endpoint>
            
    <!--元数据交换-->
            
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
          
    </service>
        
    </services>
      
      
    <!--元数据交换行为配置-->
        
    <behaviors>
          
    <serviceBehaviors>
            
    <behavior name="TestBehavior">
              
    <!--基于HTTP-GET的元数据交换-->
              
    <serviceMetadata httpGetEnabled="true"/>
              
    <!--显示详细的异常信息-->
              
    <serviceDebug includeExceptionDetailInFaults="true"/>
            
    </behavior>
          
    </serviceBehaviors>
        
    </behaviors>
      
      
    <!--定制绑定-->
        
    <bindings>
          
    <basicHttpBinding>
            
    <binding name="BasicHttpBinding_ITest" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              
    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
              
    <security mode="None">
                
    <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                
    <message clientCredentialType="UserName" algorithmSuite="Default"/>
              
    </security>
            
    </binding>
          
    </basicHttpBinding>
        
    </bindings>
    </system.serviceModel>
  • 相关阅读:
    Linux内核调试方法总结之ftrace
    Linux内核调试方法总结之ptrace
    Linux内核调试方法总结之ltrace
    文件处理
    python基础之字符编码
    第三篇:python基础之数据类型与变量
    第二篇:python基础之核心风格
    数据类型、字符编码、文件处理
    python入门
    爬取加载页面数据
  • 原文地址:https://www.cnblogs.com/artwl/p/1965779.html
Copyright © 2011-2022 走看看