How to configure a single WCF Service to have multiple HTTP and HTTPS endpoints?

前端 未结 5 949
不思量自难忘°
不思量自难忘° 2020-12-28 10:08

What I am trying to do is get a SINGLE WCF Service to work in the development environment which is the HTTP scheme, and, also, have the SAME service work in the production e

5条回答
  •  悲哀的现实
    2020-12-28 10:41

    Follow these steps-

    1) Write two endpoints for the service, one is for http and another for https.

    
        
    
          
            
              
            
          
    
          
            
              
            
               
    
        
      
    

    2) Enable both httpGetEnabled="True" httpsGetEnabled="true" in serviceBehaviors.

    
    
          
      
        
        
            
    
    
    
      
        
      
    
    
    
    

    3) Write two bindings configurations for http and https. For http give security mode="None" and for https give mode="Transport".

    
        
    
          
            
              
            
          
    
          
            
              
            
          
    
        
      
    

    Check this link

提交回复
热议问题