CachePath not working properly

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

CachePath not working properly

Postby WinAx » Fri Jun 25, 2021 12:26 am

I'm use RequestContext with RequestContextSettings.CachePath.
When I load some page and authorized, chache with coockies save correctly.
But when I reload app, use same cache path, load same page - cockies are cleared.
I'm see it in Coockies date base (at cache pach in sqlite format).
How can I fix this problem?

Code: Select all
ChromiumWebBrowser chromiumWebBrowser;

public MainWindow()
{
   InitializeComponent();

   Cef.Initialize(new CefSettings());

   RequestContextSettings requestContextSettings = new RequestContextSettings
   {
      CachePath = "CachePath"
   };

   RequestContext requestContext = new RequestContext(requestContextSettings);

   chromiumWebBrowser = new ChromiumWebBrowser
   {
      RequestContext = requestContext
   };

   chromiumWebBrowser.IsBrowserInitializedChanged += ChromiumWebBrowser_IsBrowserInitializedChanged;
}

private void ChromiumWebBrowser_IsBrowserInitializedChanged(object sender, DependencyPropertyChangedEventArgs e)
{
   if (chromiumWebBrowser.IsBrowserInitialized)
   {
      chromiumWebBrowser.Load("https://some.page/");
   }
}
WinAx
Newbie
 
Posts: 3
Joined: Tue Oct 14, 2014 6:19 am

Re: CachePath not working properly

Postby amaitland » Fri Jun 25, 2021 1:23 am

Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CachePath not working properly

Postby WinAx » Fri Jun 25, 2021 1:46 am


Thank you! Works
WinAx
Newbie
 
Posts: 3
Joined: Tue Oct 14, 2014 6:19 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 16 guests