Having an issue while making POX REST call using WCF with WebHttpBinding set to Basic Authentication (HttpClientCredentialType.Basic)
Instead of one call from the cl
So based on Remus's answer this is my workaround
public Message SendData(Message requestMessage)
{
var channel = CreateChannel();
Message responseMessage;
using (new OperationContextScope((IClientChannel)channel))
{
WebOperationContext.Current.OutgoingRequest
.Headers[HttpRequestHeader.Authorization] = "Basic "
+ Convert.ToBase64String(Encoding.ASCII.GetBytes(
Credentials.UserName.UserName + ":" + Credentials.UserName.Password));
responseMessage = channel.SendData(requestMessage);
}
return responseMessage;
}
I'm simply forcing first request to go out with Basic Authorization