Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Getting started with Webbrowser in C# Options
tonyr
Posted: Thursday, March 19, 2020 7:33:03 AM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
Hi -

I'm trying out EO.Webbrowser as an up-to-date alternative to the MS component, but am having trouble getting started.

Following the Help instructions I added EO WebControl and WebView to the Toolbox with no trouble. I placed the WebControl on my form and the WebView appeared. I noted that EO.Webbrowser.Winform was automatically added to the References.

I set webView1.Url to "www.google.com" and tried a compile.

I got the error: "The type or namespace name 'WebBrowser' does not exist in the namespace 'EO'". Should I have added a 'using' assembly reference?

Any help would be gratefully received.

Tony Reynolds
eo_support
Posted: Thursday, March 19, 2020 2:37:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
Hi,

Make sure your project references to EO.Base.dll, EO.WebBrowser.dll, EO.WebEngine.dll, and then EO.WebBrowser.WinForm.dll if you use Windows.Forms, or EO.WebBrowser.Wpf.dll if you use WPF. See here for more details:

https://www.essentialobjects.com/doc/common/refdll.aspx

Thanks!
tonyr
Posted: Thursday, March 19, 2020 2:58:48 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
Many thanks. I added the extra references and it then compiled. It is BTW a Windows Forms app.

But when I ran it, it crashed in Main() at the call: Application.Run(new Form1()); with the error: "Exception has been thrown by the target of an invocation."

Can you tell me what I've omitted?

Many thanks.

Tony
eo_support
Posted: Thursday, March 19, 2020 4:06:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
Hi,

You will have to get the inner exception and the full stack trace of the inner exception so that we can tell you exactly what went wrong.

Thanks!
tonyr
Posted: Thursday, March 19, 2020 4:15:56 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
The inner exception is: The InnerException is "Child process exited unexpectedly"

The full stack trace is
begins....
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsFormsApplication1.Program.Main() in C:\Mapping\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
.....ends

Does that help? I can zip and sent the project if not.
Regards
Tony
eo_support
Posted: Friday, March 20, 2020 1:20:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
Hi,

Please try to enable EO worker process and see if it works for you:

https://www.essentialobjects.com/doc/common/eowp.aspx

A quick test to verify whether this can resolve the issue for you is to run our TabbedBrowser.exe sample application directly from the installation folder (the folder that also contains eowp.exe). If that works, then this should work for you.

Thanks!
tonyr
Posted: Tuesday, March 24, 2020 10:38:53 AM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
Still no joy....

The link suggested it might be my antivirus (AVG Free edition) so I disabled that, but it still crashed.

I added the suggested line:
EO.Base.Runtime.EnableEOWP = true;
to the Main() program but still got failure. However, the exception is now "System.Reflection.TargetInvocationException was unhandled" instead of "Child process exited".

I ran the TabbedBrowser.exe sample. I saw a tabbed dialog, and got a pop-up message "a licence is needed for EO.Wpf product". Shortly after that the dialog closed without showing anything interesting.

I'm getting desperate now. Any further suggestions?

Regards
Tony
eo_support
Posted: Tuesday, March 24, 2020 11:49:25 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
Hi,

What version of Windows are you using? Make sure you apply all Windows updates. Also make sure you are running the latest version from our download page.

Thanks!
tonyr
Posted: Tuesday, March 24, 2020 11:59:57 AM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
I'm running Windows Home 10.0.18363 which I believe is the latest version.

I downloaded the EO material last Thursday.
tonyr
Posted: Tuesday, March 24, 2020 12:14:24 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
My version of Visual Studio is a few years old. is there a minimum specification for this?
I’m using NET Framework 4
eo_support
Posted: Tuesday, March 24, 2020 12:35:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
Hi,

Visual Studio's version does not matter. This has to have to do with your AntiVirus application. As a temporary test, can you try to completely uninstall your AntiVirus application and see if it works?

Thanks!
tonyr
Posted: Tuesday, March 24, 2020 2:43:08 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
I completely uninstalled AVG and AVG Secure Browser. It made no difference. I'm still getting the {"Exception has been thrown by the target of an invocation."} error.
eo_support
Posted: Tuesday, March 24, 2020 2:53:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
I am not sure what else we can tell you then. There is something on your system that is interfering. We have a fresh Windows 10.18363.418 and it works fine. You may want to try on it on a different system and see if it works for you.
tonyr
Posted: Tuesday, March 24, 2020 2:57:05 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
Could I at least send you the zipped project for you to try? I didn't add any code, just dropped the component onto the form, so it's only 327kb zipped.
If you can give me a contact email I'll send it over for you to verify.
tonyr
Posted: Tuesday, March 24, 2020 2:57:37 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
Sorry, I meant 37 kb!
eo_support
Posted: Tuesday, March 24, 2020 2:59:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
It shouldn't have anything to do with your project because you said even the TabbedBrowser sample application doesn't work when running directly from the installation location. So it must have to do with your system.
tonyr
Posted: Tuesday, March 24, 2020 3:05:46 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
Yes, but (see above) TabbedBrowser complained I didn't have a licence for EO.wpf. Should it still have run?
eo_support
Posted: Tuesday, March 24, 2020 3:11:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
No. TabbedBrowser should run without any problem and allow you to load and display a web page just like a regular Web browser.
tonyr
Posted: Tuesday, March 24, 2020 3:21:33 PM
Rank: Member
Groups: Member

Joined: 3/19/2020
Posts: 11
I just sent TabbedBrowser.exe to a friend with W10 and it doesn't work on his machine either.
Still, with this level of support it's better that I find some other way to solve the problem.
eo_support
Posted: Tuesday, March 24, 2020 3:48:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,032
You can't just send TabbedBrowser.exe over. It depends on a number of other files in the same folder. Ask your friend to download the installer from our download page, run it, then go to "c:/Program Files (x86)/Essential Objects/EO.Total 2020" to run TabbedBrowser.exe.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.