I've been trying to consume a WCF service outside my company. On my local machine environment it works just fine. On my cluster (Linux env), however, I got the message "The HTTP request was forbidden with client authentication scheme 'Anonymous'The HTTP request was forbidden with client authentication scheme 'Anonymous'."
My Reference class was created by svcutil. This is a peace of the code responsable for the httpBinding:
BasicHttpBinding result = new BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
return result;
I've struggled with this for so long and would appreciate any clue on the issue.
I've tried to setup my class like this:
BasicHttpBinding result = new BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
result.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
result.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
result.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
return result;
Still, I got the error message mentioned... The service I've been trying to call runs on HTTP. Could anybody help me out?