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

    <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>

  • 相关阅读:
    PreferenceScreen 偏好显示类 的使用
    Android实战技巧:如何在ScrollView中嵌套ListView
    android onActivityResult不执行问题
    java zip解压中文乱码问题
    RandomAccessFile读取大文件时效率很低,现进行改进---BufferedRandomAccessFile
    HTTP RANGE(多线程下载相关)
    Android实现ListView异步加载图片
    自己调用webservice方法总结(带请求头SoapHeader)
    Android将程序崩溃信息保存本地文件
    Android的intent之间复杂参数的传递
  • 原文地址:https://www.cnblogs.com/soundcode/p/2133540.html
Copyright © 2011-2022 走看看