I write a simple browser by using cefsharp, At the beginning of opening the application, it's normal,but after the website loaded, a dos form flashed past. the application worked, but I don't know why the dos form flashed past.Two days ago,when I ran the application, it's normal, no dos form flashed.
Asked
Active
Viewed 385 times
1 Answers
1
if you're using ppapi-flash
(pepper flash) then the first time you load a web-page that uses flash you may see a console window open.
The only known work-around for this is to play with Cef sandboxing modes, but CefSharp specifically has no support for sandboxing and if you want more control over it you would need to bootstrap Cef through a custom VC++ layer. Read more about the upstream issue here.
It is also possible to use a version of chromium before v45 and enable npapi as an alternative to pepper. This is the release of CefSharp that still uses chromium 43, and npapi can be enabled via the following configuration.

caesay
- 16,932
- 15
- 95
- 160
-
I ran it on my friend's computer, the flashed form did't occured. And I added the code you showed into my project, when I run it, there is still a dos form flashed past. – shiyan Mar 22 '17 at 07:25
-
@shiyan: do you use pepper flash? you could try removing pepper and instead using npapi. [example of how to enable it is here](https://github.com/cefsharp/CefSharp/blob/cefsharp/43/CefSharp.Example/CefExample.cs#L54). Either way, you should disable pepper flash and see if the problem still exists. – caesay Mar 22 '17 at 07:27
-
yes! I installed pepper in my computer, I uninstalled it a moment ago, and when I ran the application, there is no dos form flashed! Thank you! I read some article about npapi, npapi is unsafe. If I still want to use pepper, what should I do ? – shiyan Mar 22 '17 at 07:49
-
The only work-around for the pepper flash issue is to disable the Cef sandbox, although there is some talk the suggests that CefSharp doesn't support this, I don't know for sure. Your only option would be to load Cef manually through a VC++ wrapper instead of using CefSharp. – caesay Mar 22 '17 at 07:51
-
CefSharp doesn't support sandboxing as it's practically impossible to implement in .Net. What's required to make the console window go away is actually implementing sandboxing. Secondly npapi support was removed from Chromium in version 43, so that's only an option if you wish to use an old unsupported version. – amaitland Mar 22 '17 at 08:08
-
The application ran correctly on computer A and B. the operate system version of computer A is win7 X86, B is win10 X64, and both installed .Net 4.5.2. But when ran it on computer C, the operate system of C is win7 X86, and installed .net 4.6, when ran the application, it stop working, the detail information is – shiyan Mar 22 '17 at 08:21
-
-
@amaitland: npapi support was removed from Chromium in version 45. It was only disabled by default in 43. – caesay Mar 22 '17 at 23:48
-
@caesay You are correct, was a long time ago that I wrote those release notes, there have been 5 major releases since then. – amaitland Mar 23 '17 at 02:17
-
You link to 45 saying it's an option, when it was removed in that version – amaitland Mar 23 '17 at 02:48