what is the “behaviorConfiguration” attribute of service?

后端 未结 4 2061
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 05:31

what is the \"behaviorConfiguration\" attribute of service?


      

        
4条回答
  •  -上瘾入骨i
    2021-02-05 06:05

    There are 3 important sections when you configure a WCF service.

    1) Defining the Services:

    
          
            
            
          
        
    

    NOTE the value of behaviorConfiguration is a reference to a section further on in the config see below...

    2) Defining the 'Service Behaviours'

     
            
              
              
            
          
    

    3) Defining the 'Endpoint Behaviours'

    
            
              
            
          
    

    All 3 sections are the basics for what you need to set up a service (although this can be done programatically).

    With regard to your question the behaviorConfiguration section relates to point 2 and 3 in my points above. Its where you lay out the sort of actions you want your service to have. for example above I have said that I want to allow MetaData to be published. This will essentially create a WSDL which describes the service.

    The full config is here:

    
    
    
        
            
        
    
      
    
        
        
          
            
            
          
        
    
    
        
        
    
          
            
              
              
            
          
    
          
            
              
            
          
    
        
    
      
    
    
    

提交回复
热议问题