WCF Service Client: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding

后端 未结 19 2386
情书的邮戳
情书的邮戳 2020-11-27 18:30

I\'ve got a WCF Service running on my local IIS server. I\'ve added it as a service reference to a C# Website Project and it adds fine and generates the proxy classes automa

19条回答
  •  感情败类
    2020-11-27 18:44

    I had a similar situation, but the client config was using a basicHttpBinding. The issue turned out to be that the service was using SOAP 1.2 and you can't specify SOAP 1.2 in a basicHttpBinding. I modified the client config to use a customBinding instead and everything worked. Here are the details of my customBinding for reference. The service I was trying to consume was over HTTPS using UserNameOverTransport.

    
        
            
                
            
            
                
            
            
        
    
    

提交回复
热议问题