bindingConfiguration vs bindingName

后端 未结 4 1453
逝去的感伤
逝去的感伤 2021-01-01 13:50

What exactly is the difference between bindingConfiguration and bindingName elements in a WCF endpoint element? The reason that I ask is I am creating an endpoint which use

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-01 14:13

    Your service configuration binding is incorrect. So when you correctly refer to your binding configuration using the bindingConfiguration attribute, your service is not working. When you use the bindingName attribute, which is an invalid used attribute in your case, the service just starts a basicHttpBinding without looking at your custom configuration, which seems to work correctly.

    For the different between the two elements look at: http://msdn.microsoft.com/en-us/library/ms731320.aspx.

    So, using the bindingConfiguration attribute is the only correct thing. Now we still need to look at what is wrong with you binding configuration itself :-) See the following example to extract your relevant information from.

    
      
        
          
        
      
    
    
      
        
          
          
      
      
            
                
                    
                
            
      
      
        
          
            
          
        
      
      
    
    

    See http://msdn.microsoft.com/en-us/library/bb398990.aspx for more details.

提交回复
热议问题