The HTTP request was forbidden with client authentication scheme 'Anonymous'. The remote server returned an error: (403) Forbidden

前端 未结 5 1436
囚心锁ツ
囚心锁ツ 2020-12-31 09:45

I am trying to create a secure webservice.

Here is the contract and service implementation

[ServiceContract()]
public interface ICalculatorService
{         


        
5条回答
  •  佛祖请我去吃肉
    2020-12-31 10:19

    If you run self hosted WCF service (without IIS) you can enable anonymous clients just by adding to the config file (in server) the next settings:

    
        
            
                
                
            
        
    
    

    Also, set clientCredentialType to "InheritedFromHost":

    
          
            
              
                
              
            
          
    
    

    References:

    Using Multiple Authentication Schemes with WCF

    Understanding HTTP Authentication

提交回复
热议问题