Replies: 1 comment 1 reply
-
In future please use discussions to ask questions. https://github.com/cefsharp/CefSharp/discussions For a RequestContext you also need to register the schemehandlerfactory. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you use requestContextSettings to set the view directory. Then settings.RegisterScheme will not work
var requestContextSettings = new RequestContextSettings { CachePath = CachePath, PersistSessionCookies = true, PersistUserPreferences = true }; var requestContext = new RequestContext(requestContextSettings); var browser = new ChromiumWebBrowser(url) { RequestContext = requestContext, Dock = DockStyle.Fill };
After using the above code, requestContextSettings cannot work properly, please ask the gods
const string cefSharpExampleResourcesFolder = @"./Resources"; settings.RegisterScheme(new CefCustomScheme { SchemeName="abc", SchemeHandlerFactory=new FolderSchemeHandlerFactory( rootFolder:cefSharpExampleResourcesFolder, schemeName:"abc", hostName:"abc", defaultPage:"home.html" ) }); Cef.Initialize(.......);
My catalog files are all valid,There is no problem directly using var browser = new ChromiumWebBrowser(url);
Beta Was this translation helpful? Give feedback.
All reactions