WinForms problem with mshtml and ie9 - winforms

IE9 appears to have broken my mshtml com based WebBrower html editor in my 32-bit winforms .net 3.5 application. (It has to be set to 32-bit due to an activex USB device controller I have to use.)
The bug is erratic - it doesn't happen on my system. If my customer runs IE9, and then my 32-bit application with the WebBrowser based html editor, my app hangs, no response. This did not happen with IE8.
This is so screwed up I don't even know how to formulate the question.

Related

CefSharp.Wpf: FileLoadException when trying to load assembly

We have an old legacy application that is running with MS Access. We are in the process of migrating it to WPF. For that we created a WinForms control, that is showing our new WPF stuff in an ElementHost. This WinForms control is then somehow used in a COM ocx which then is placed on a MS Access form. This works so far, and for the time being this is like it is and I can't change it.
Until now we used the built-in WebBrowser control from .NET to show web sites, but since this control is based on IE 11, we are looking for a replacement. WebView2 is not working in an ElementHost, so now we are investigating and testing CefSharp for WPF.
In all of my stand-alone tests it worked so far, but when I tried to integrate it into our software today I stumbled upon a problem and I'm not sure how to fix that.
When I put the ChromiumWebBrowser control from CefSharp onto our WPF window and ran our software I got an IO.FileLoadException for the file CefSharp.Wpf. Checking that with fuslogvw.exe I've seen, that .NET looked for that file in the directory where the MSAccess.exe is situated, probably because this in fact is the executing assembly.
So I registered an AppDomain.CurrentDomain.AssemblyResolve event to manually load the necessary files from where they are situated. This worked for
CefSharp.Wpf
CefSharp
CefSharp.Core
But then it tried to load CefSharp.Core.Runtime and although this assembly is present I get an IO.FileLoadException (this file or one of its dependencies can't be found) when loading this assembly. I assume that it tries to find one of its own dependencies (non .NET) and looks for it in the wrong place (maybe the MS Access directory again?).
Do you have any suggestions how I can tell CefSharp and all of its dependencies (direct or indirect) where they can be found and where they should be loaded from?

CEFSharp not rendering correctly on client machine

My Cefsharp application with windows forms is working correctly on my machine and every other machine I tried on except my client's machine, (screen shot below).
I am using winforms to place my cefsharp control
Any idea why this might happen?

WebBrowser font-face request abort weirdness

I've built an WPF application (.NET 4.5) which runs on Win7 IE11 machines. The main window has a webbrowser control on it and nothing else (its a very simplified version of my actual app which is experiencing issues).
On some machines when browsing to a given web site the font-face fonts (WOFF and TTF) are not working, even though they do work in IE11 on the same machine. I have used a reg punch to get the webrowser to run in IE11/ edge mode, this does not fix the issue.
Using Fiddler2 I have seen that the request for the font gets aborted after the whole font was downloaded. Repeating the request with Fiddler works and doesn't get aborted, so I know the issue must be with the webbrowser control.
All the machines affected are on a certain domain. Does anyone know of any permissions at domain/policy level which would cause the font to work in IE but be aborted/rejected in a WPF webbrowser control?
This only happens for fonts delivered over HTTPS
You can try changing the font download settings in IE, as illustrated here:
We have fixed this. It is a security (SSL) issue with cached data. You can fix it by setting the following option in internet explorer: See http://support.microsoft.com/kb/815313
Check if any cache invalidating headers are possibly returned by the server; IExplorer doesn't cope well with it and will not show fonts: See here

Touch gestures support of WinForms controls in WPF application

There are two versions of WebBrowser control (WinForms and WPF). WPF version supports touch and multitouch gestures. Does WinForms version of WebBrowser embedded in WPF application with WindowsFormsHost support touch and multi-touch gestures?
Yes the WebBrowserControl regardless of how it is hosted. It will still get touch and multi-touch gestures as long as its the only thing getting the input and the touch is from a recognised touch device to Windows.
Note you can't quite hook into this nor can you touch outside and inside the WebBrowserControl as it runs in a different context similar to running in a different window
Also for what its worth the underlying ActiveX Host is just running an Internet Explorer frame. If you have IE8 or more recent (such as assuming windows 7 or 8 for you?) it will run it in IE7 Compatibility mode too.

WPF WebBrowser Control: What browser does it use?

Does the WPF WebBrowser control always use Internet Explorer or does it use the default web browser on the system ?
Regards,
MadSeb
One issue the Web Browser Control has that it’s perpetually stuck in IE 7
rendering mode by default. Even though IE 8 and now 9 have
significantly upgraded the IE rendering engine to be more CSS and HTML
compliant by default the Web Browser control will have none of it. IE
9 in particular – with its much improved CSS support and basic HTML 5
support is a big improvement and even though the IE control uses some
of IE’s internal rendering technology it’s still stuck in the old IE 7
rendering by default.
This applies whether you’re using the Web Browser control in a WPF
application, a WinForms app, a FoxPro or VB classic application using
the ActiveX control. Behind the scenes all these UI platforms use the
COM interfaces and so you’re stuck by those same rules.
See this:
Web Browser Control – Specifying the IE Version
http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version
Internet Explorer, though there are "hacks" posted on the internet which allow you to use a workaround in order to launch any browser you like.
This thread seems to explain one of the possible solutions.

Resources