title: C# Web Browser Control - Make it Just Like IE
body: <p>My WinForms project involves a C# web browser control - and I am getting the dreaded scripting error (like this image, different error though) when I visit different webpages:</p>
  
  <p><img src="https://social.msdn.microsoft.com/Forums/getfile/530703" alt="script error"></p>
  
  <p>I have read, <em>and done</em>, all the stuff about updating the browser emulation mode from IE7 to IE9 (or 11) in the windows registry (a la this stuff <a href="https://stackoverflow.com/questions/17922308/use-latest-version-of-internet-explorer-in-the-webbrowser-control">Use latest version of Internet Explorer in the webbrowser control</a>) and the error still persists.</p>
  
  <p>Now this is really frustrating due to the fact the the web page I am visiting works fine in IE itself, it is just my embedded one that has the error.</p>
  
  <p>In desperation, I renamed my generated exe file "iexplore.exe" and bingo, the app works, with <em>no scripting errors</em>.</p>
  
  <p>So this tells me there must be other settings in the registry or somewhere that cause this error, if anyone knows what these are I'd be most grateful if you could share them please!</p>
  
  <p>N.B. I don't want to suppress the errors, I want to run the script.</p>