1

I have a C# Wpf application that has a reporting functionality that simply displays an XML file in a WPF web browser that is styled using a XSL file.

During development and testing this worked perfectly and we had no problems. However when deployed, a single customer complained of the following error:

The ordinal 459 could not be located in the dynamic link library urlmon.dll

We have debugged this remotely to the line where the browser is actually navigating to the file, and upon some serious googling and customer interrogation, it appears that this is due to Internet Explorer having been disabled as a policy on their network meaning that the web browser cant find the engine that it needs to work.

As I understand it the Wpf web browser control uses the Internet Explorer libraries, and when IE is not installed then it doesnt work - hence the error.

So my question is twofold:

  • Can I get the web browser to use a default browser engine so that it will use Chrome / Firefox / Internet explorer depending on which one is the default.

  • How can I detect whether the necessary IE libraries are available (and which libraries are these). Furthermore is it possible to detect this error in .net so that I can supply my own message as the current one is damn near useless to the user

I have found a lot of ways to find the version of internet explorer but no simple way of detecting whether the libraries are available, as the version seems to return the same value, whether IE is enabled or not.

Steven Wood
  • 2,675
  • 3
  • 26
  • 51
  • `WebBrowser` uses IE (IE8 by default) and you cannot change that also [this](http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/the-ordinal-459-could-not-be-located-in-the/d93d1cdf-763b-4403-bcc8-ca06d16f4f4a) may help with the error you're getting. If you want to change emulation version you need to change [`FEATURE_BROWSER_EMULATION`](http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx) on client machine for your app – dkozl Jan 11 '15 at 14:36
  • I would look for another way to display XML. WebBrowser control is problematic at best. WebBrowser is a com wrapper. – paparazzo Jan 11 '15 at 16:18
  • Have you seen http://stackoverflow.com/questions/790542/replacing-net-webbrowser-control-with-a-better-browser-like-chrome? – Lance Leonard Jan 11 '15 at 22:41
  • Are you sure the error is because of the restrictive system policy? Have you checked the IE version on the machine in trouble? Does your app target 32-bit or 64-bit version of WebBrowser (and the underlying components)? – noseratio Jan 12 '15 at 00:59

0 Answers0