2

I'm using WebBrowser control in a WPF App to show a web page embedded on my application. The problem is that when the page is loaded i get the message "JSON" is undefined.

The web page im loading use the function "JSON.stringify" but seems that the webbrowser control doesnt support JSON object.

There are any workaround or a way to eneable the support to JSON object on the WPF Web Browser or WinForms Web browser?

Diego
  • 666
  • 1
  • 8
  • 27
  • Have you tried using the WinForms WebBrowser? – Omri Btian Sep 26 '13 at 13:00
  • 1
    @Diego, you're after `FEATURE_BROWSER_EMULATION`, [more info](http://stackoverflow.com/a/18802626/1768303). – noseratio Sep 26 '13 at 14:29
  • 1
    Thanks @Noseratio i was under FEATURE_BROWSER_EMULATION so i nedded to register my up in the registry to use a internet explorer render engine >= IE8 – Diego Oct 17 '13 at 19:29

1 Answers1

2

The problem was that i was under a windows feature call FEATURE_BROWSER_EMULATION that basically register each app and the version of browser compatibility mode that should use.

This apply to apps that uses controls like WebBrowser so by defult take the minimun version compatibilitu mode under the IE installed and the JSON object is incopatible until IE 8 but anyway the solutios is to register during installation proces maybe that your app need compatibility mode >= to windows 8 on the registry:

HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION Add your process name then set the DWORD value = version of compatibility mode required take a look at the table

Diego
  • 666
  • 1
  • 8
  • 27