Openwebkitsharp - COMException was unhandled?

I am making a c# app that get a website I have and views it in the app. For this I am using OpenWebKitSharp to get the web view with HTML5. I followed all the instructions in the How-to-use.txt but, it runs with a popup saying it is not initialized and I should follow the How-to-use.txt. I am open to alternative as long as they can use HTML5.

My System:

  • Windows 10
  • Latest Visual Studio
  • Latest OpenWebKitSharp

using System;
using System.Windows.Forms;
using WebKit;

namespace Cosmic_Stocks
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            webKitBrowser1.UseJavaScript = true;

            Uri myUri = new Uri("http://cosmicsearch.org/stocks", UriKind.RelativeOrAbsolute);
            webKitBrowser1.Url = myUri;
        }
    }
}

The Popup:

Update:

Now there is a new error.

COMException was unhandled
AN unhandled exception of type 'system.runtime.interop.services.comexception' occored inopenwebkitsharp.dll

I got that when I was redoing the program

Answers


Following How to use.txt instructions worked just fine:

Notes:

  • Windows 10
  • VisualStudio 2015 Community Edition
  • .NET 4.5.2
  • OpenWebKitSharp 3.0.1.0023

When adding project References to OpenWebKitSharp.dll and WebKit.Interop.dll, both files were selected from the open-webkit-sharp\Binary folder.

The same OpenWebKitSharp.dll from the open-webkit-sharp\Binary folder was added to Tools -> Choose Toolbox Items...

All files and sub-folders under open-webkit-sharp\Core and open-webkit-sharp\References were copied under bin\Debug folder of the target project.

The very same code as in your post was used:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        webKitBrowser1.UseJavaScript = true;

        Uri myUri = new Uri("http://cosmicsearch.org/stocks", UriKind.RelativeOrAbsolute);
        webKitBrowser1.Url = myUri;
    }
}

Need Your Help

Direct send Connect request to Other users using LinkedIn SDK or API

ios iphone linkedin linkedin-api

How do we connect to other user’s using after authentication with LinkedIn using LinkedIn SDK or API without re-directing to LinkedIn Application or opening his/her profile in web view ?

Removing "Array ()" from CURL result in PHP

php json curl

I'm trying to fetch data from a password protected JSON feed using curl, but the result adds "Array (" to the beginning of the feed and ")" at the end, making it invalid.