Does anybody know BC15 onpremise "UserName" credential type use which scheme to connect BC using httpclient?
For the "UserNavPassword" credential type, the scheme is "Basic", but I hardly to find about "UserName".
below is my connect code:
try
{
CredentialCache CCatch = new CredentialCache();
CCatch.Add(new Uri("">bc.sunshinemills.com/.../SignIn, "Negotiate", new NetworkCredential("test", "test"));
HttpClientHandler Handler = new HttpClientHandler();
Handler.UseCookies = true;
Handler.CookieContainer = new CookieContainer();
Handler.Credentials = CCatch;
Client = new HttpClient(Handler);
Client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
HttpResponseMessage response = Client.GetAsync("URL").Result;
// LogTrace(response.StatusCode.ToString());
string sResponseConent = response.Content.ReadAsStringAsync().Result;
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
if (Client != null)
Client = null;
}
Thanks,
Ming