Reputation: 616
How i can add cookie to ChromiumWebBrowser before navigating to a URL.
I have a URL which I want to navigate, however I would like to add authToken cookie before navigating to avoid going to Login page.
Please suggest
Upvotes: 1
Views: 4951
Reputation: 339
I have used below code to add authentication Token cookie before navigating to specific URL and avoid going to Login page.
var mngr = Cef.GetGlobalCookieManager();
Cookie Ac = new Cookie();
Ac.HttpOnly = true;
Ac.Name = ".ASPXAUTH";
Ac.Value = "";
mngr.SetCookieAsync(matrixUrl.ToString(), Ac);
Upvotes: 1