WCF系列(三) -- WCF配置文件注释 【转】

xml version="1.0" encoding="utf-8"  ?>
< configuration >
    

    
< system.ServiceModel >
        

        
< services >
            

            
< service  name ="名称空间.类型名"  behaviorConfiguration ="behavior名" >
                

                
< endpoint  address ="URI"  binding ="basicHttpBinding"  contract ="Contract全限定名"  bindingConfiguration ="binding名"  name ="" >
                    

                    
< headers >
                        

                    
headers >
                    
< identity >
                        

                        
< userPrincipalName > userPrincipalName >
                        
< servicePrincipalName > servicePrincipalName >
                        
< dns > dns >
                        
< rsa > rsa >
                        
< certificate  encodedValue ="" > certificate >
                        

                        
< certificateReference  storeName =""  storeLocation ="" >
                        
certificateReference >
                    
identity >
                
endpoint >
                
< host >
                    
< baseAddresses >
                        

                        
< add  baseAddress ="http://address"   />
                    
baseAddresses >
                    
< timeouts > timeouts >
                
host >
            
service >
        
services >

        
< bindings >
            

            
< basicHttpBinding >
                

                
< binding  name ="binding名" >
                
binding >
            
basicHttpBinding >
        
bindings >
        

        
< behaviors >
            

            
< serviceBehaviors >
                

                
< behavior  name ="" >
                    

                    
< serviceMetadata  httpGetEnabled ="true"  httpGetUrl ="http://URI:port/address"   />
                
behavior >
            
serviceBehaviors >
            

            
< endpointBehaviors >
            
endpointBehaviors >
        
behaviors >
        

        
< client >
            

            
< endpoint  address ="URI"
                binding
="basicHttpBinding"  bindingConfiguration ="binding名"
                contract
="Contract全限定名"  name ="endpoint配置名"   />
        
client >
    
system.ServiceModel >
configuration >

你可能感兴趣的:(WCF系列(三) -- WCF配置文件注释 【转】)