Winforms: Update WebBrowser control in .NET Core

Created on 2 Dec 2018  路  15Comments  路  Source: dotnet/winforms

Copied from https://github.com/dotnet/core/issues/2093

Since WinForms is moving to .NET Core 3.0, I hope you upgrade the WebBrowser control to use the IE version installed on the user PC. The current WebBrowser control uses IE 7 and causes many problems. There is a workaround to solve this, but doing it in the user's PC needs permissions. See this topic for more details:
https://stackoverflow.com/questions/17922308/use-latest-version-of-internet-explorer-in-the-webbrowser-control?noredirect=1&lq=1

enhancement external issue

Most helpful comment

@merriemcgaw
What about Replacing the IE7 with MS Edge (upcoming Edge will be based on chromium), Look like new MS Edge will support Windows 7, so there should not be any issue with Windows 7.

All 15 comments

@merriemcgaw FYI: We can move bugs from core repo after we are open - that way the person who filed it will be preserved (which may be useful) ...

There is a workaround to solve this, but doing it in the user's PC needs permissions.

@MohammadHamdyGhanem The X-UA-Compatible header method does not: https://stackoverflow.com/a/39534209/1555496 - though it requires you to control the headers or the html. I haven't tried it but maybe it works to just put the actual page inside an iframe on a page with the http-equiv tag.

but doing it in the user's PC needs permissions.

You can set the registry key in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION (rather than HKEY_LOCAL_MACHINE) to disable IE7 Compatibility View, which doesn't require elevated permissions; ideally at the top of your Main() method before GUI code is invoked.

See: https://github.com/Microsoft/monaco-editor/issues/114#issuecomment-242778649

I don't think the comments above should be the actual approach. At the end browser control would default itself to IE 11 especially there are still a lot of Windows 7 users who cannot use Edge browser. With a lot new web based applications out there, it impossible support this component. IE 11 doesn't support a lot new web standards as it is getting harder and harder every day to support IE 11's desires. A fundamental change is necessary here. Please consider switching WebBrowser control to Edge browser. Even if it is possible, use the one that is going to be written with Chromium platform so that Windows 7 users will also benefit this.

@BuraChuhadar
The control should use the highest version available. Edge is version 12 and above.

@merriemcgaw
What about Replacing the IE7 with MS Edge (upcoming Edge will be based on chromium), Look like new MS Edge will support Windows 7, so there should not be any issue with Windows 7.

We're going to hold off on doing anything with the current WebBrowser control for Core 3.0, and instead focus on getting the new Edge control supported in Core. That is the way forward and will be tracked as a new issue when the times comes. We will have something exciting to share in the coming months, so stay tuned.

@merriemcgaw is there any plan to replace IE7 with chromium?

Yes, it is something we are definitely considering. However we do not currently have any set timelines for this feature.

can you reopen the issue

This work is in progress right now but it will be a separate Nuget package reference that needs to be added. Stay tuned and I'll let you know when we have some definitive progress to announce and let you know where you can find this control

We'll reply back on this thread when they've got their first preview. We've seen the first draft of the PR that creates the control. But, since we're not doing the work I'm going to close this issue. Nothing says I can't update a closed issue 馃槂

I've worked on an experimental control based on ICoreWebView2

See https://github.com/hughbe/EdgeWebBrowser

image

The Edgium team is building the new .NET browser control, which we will get at some point in the future.

Was this page helpful?
0 / 5 - 0 ratings