cefsharp DownloadUrlAsync skips Cookie

37 views Asked by At

load url in browser control that require cookie and authentiacaion is ok

  CefSharp.OffScreen.ChromiumWebBrowser browser = new CefSharp.OffScreen.ChromiumWebBrowser(Url, requestContext: reqContext);

but using download url

            var ppp =await browser.GetMainFrame().DownloadUrlAsync(Url);
            var ooop= Encoding.UTF8.GetString(ppp);

redirect to login page and cookie header not sent

1

There are 1 answers

0
Moslem7026 On BEST ANSWER

This is expected at the moment. It might be possible to add support for sending cookies.

Try adding the UrlRequestFlags.AllowStoredCredentials flag to the request in DownloadUrlAsync

A new optional param has been added to allow passing in UrlRequestFlags in version 116.0.150.

Source