WCF配置文件注释

   1: xml version="1.0" encoding="utf-8" ?>
   2:   <configuration>
   3:        <system.ServiceModel>
   4:            
   5:            <services>
   6:                
  13:                <service name="名称空间.类型名" behaviorConfiguration="behavior名">
  14:                     <host>
  15:                         <baseAddresses>
  16:                             
  19:                             <add baseAddress="http://address" />
  20:                          
  21:             baseAddresses>
  22:                         <timeouts>timeouts>
  23:                      
  24:           host>
  25:                     
  38:                     <endpoint address="URI" binding="basicHttpBinding" contract="Contract全限定名" bindingConfiguration="binding名" behaviorConfiguration="String" name="">
  39:                         
  40:                         <headers>
  41:                             
  42:                          
  43:             headers>
  44:                      
  45:           endpoint>
  46:                  
  47:         service>
  48:             
  49:       services>
  50:            <bindings>
  51:                
  53:                <basicHttpBinding>
  54:                     
  55:                     <binding name="binding名">
  56:                      
  57:           binding>
  58:                  
  59:         basicHttpBinding>
  60:             
  61:       bindings>
  62:            
  63:            <behaviors>
  64:                
  65:                <serviceBehaviors>
  66:                     
  69:                     <behavior name="此Behavior名称">
  70:                         
  75:                         <serviceMetadata httpGetEnabled="true" httpGetUrl="http://URI:port/address" />
  76:                         
  77:                         <serviceCredentials>
  78:                             
  85:                             <serviceCertificate storeName="存储区" storeLocation="存储位置" x509FindType="FindBySubjectName" findValue="server1" />
  86:                          
  87:             serviceCredentials>
  88:                      
  89:           behavior>
  90:                  
  91:         serviceBehaviors>
  92:                
  93:                <endpointBehaviors>
  94:                     
  97:                     <behavior name="此Behavior名称">
  98:                         
  99:                         <clientCredentials>
 100:                             
 107:                             <clientCertificate storeName="存储区" storeLocation="存储位置" x509FindType="FindBySubjectName" findValue="Client1" />
 108:                              <serviceCertificate>
 109:                                  <authentication certificateValidationMode="None" />
 110:                               
 111:               serviceCertificate>
 112:                          
 113:             clientCredentials>
 114:                      
 115:           behavior>
 116:                  
 117:         endpointBehaviors>
 118:             
 119:       behaviors>
 120:            
 121:            <client>
 122:                
 131:                <endpoint address="URI" binding="basicHttpBinding" bindingConfiguration="binding名" behaviorConfiguration="String" contract="Contract全限定名" name="endpoint配置名" >
 132:                     
 133:                     <identity>
 134:                         <userPrincipalName>userPrincipalName>
 135:                         <servicePrincipalName>servicePrincipalName>
 136:                         
 137:                         <dns>dns>
 138:                         <rsa>rsa>
 139:                         
 142:                         <certificate encodedValue="">certificate>
 143:                         
 150:                         <certificateReference storeName="存储区" storeLocation="存储位置" x509FindType="FindBySubjectName" findValue="Client1" />
 151:                      
 152:           identity>
 153:                  
 154:         endpoint>
 155:             
 156:       client>
 157:         
 158:     system.ServiceModel>
 159:   configuration>

转载于:https://www.cnblogs.com/HeroBeast/archive/2009/04/14/1435470.html

你可能感兴趣的:(WCF配置文件注释)