Welcome Guest Search | Active Topics | Sign In | Register

EO WebBrowser Control for WPF Options
ilovetofu
Posted: Friday, January 3, 2014 5:04:06 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
ENVIRONMENT: Windows 7.0 Visual Studio 2010 Professional (.NET 3.5 - C#)

I am experimenting with the downloaded sample app and have a few issues as follows:

ONE:
I opened 2 tabs and then navigated to a site on only the first tab. I moved around the website and then when I put the cursor in the address box to enter a new website address, and then press enter, nothing happened. I basically ended up stuck on one page and could not navigate anywhere else.

Then when I clicked on the 2nd tab and then back to the 1st tab, what was in the address box on the first tab changed.

TWO:
I went to LinkedIn website and logged in. With the app still running, I opened another tab and when I navigated to LinkedIn, it was asking me to log in again! Does the browser not have any default cookie handling?

eo_support
Posted: Friday, January 3, 2014 10:25:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Thanks for posting in the forum. Please check if you are running the latest DLL. The latest EO.WebBrowser.dll should have a version number 2.0.20. We have not been able to reproduce either problem with this version.

Thanks!
ilovetofu
Posted: Saturday, January 4, 2014 2:35:58 PM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
Yes, I have the most current version. Not to worry, maybe it was just a one-off thing. The browser seems to work well :)

With the EO Browser, how do I make it work so that when I return to a site like LinkedIn, I don't have to log in again? Any advice on what code needs to be written, or can someone point me to some documentation that explains how to do this?

Thanks.
eo_support
Posted: Saturday, January 4, 2014 5:10:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

You can set this property:

http://www.essentialobjects.com/doc/6/eo.webbrowser.runtime.cachepath.aspx

If you do not set this property, then cookies are stored in memory and is discarded when your app close. If you set this property, then cookies are stored on disk.

Thanks!
ilovetofu
Posted: Tuesday, January 7, 2014 7:29:20 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
I set the Runtime.CachePath property and I can see files in the folder. I open a tab, go to LinkedIn site and sign in. Then I close that tab, open another one and go to LinkedIn again, and it still takes me to the LinkedIn sign in page! ??? I am not even closing the app. Is there something else I am supposed to be doing? I am just trying to do a basic task that IE or Chrome does, which is to recognise that I've already signed in to the site.
eo_support
Posted: Wednesday, January 8, 2014 3:09:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Can you try it with our TabbedBrowser demo app and see if it works for you? We tested it and it seems to work fine here. We can log in linkedin, then close the app, then go back to open the page again, and it stays as logged in.

Thanks!
ilovetofu
Posted: Thursday, January 16, 2014 6:40:09 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
I have not been able to use the Tabbed Browser demo app. When I open it (from the Windows start menu) I just get a small dialog window that appears saying "Can not create cache directory or it is not writable". When I click OK, the dialog closes and that's all that happens.

So I am using the sample project which I open in Visual Studio 2010. I have set the Runtime.CachePath property and can see all the files in that folder.

Here are the exact steps I am doing:

1. Open Tab and navigate to Google.
2. Search Google for "LinkedIn"
3. Click on the LinkedIn link in the Google search results.
4. Takes me to LinkedIn site asking for login.
5. Log in to LinkedIn.
6. Close the Tab.
7. Open another Tab and repeat the above steps (1-5). I am presented again with the LinkedIn sign in page.

When I do this in IE or Chrome, I close the browser, go to Google, search "LinkedIn", click the LinkedIn link. I then arrive at LinkedIn site (as logged in).

eo_support
Posted: Thursday, January 16, 2014 3:31:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

That makes sense. The "cache directory" is also used to save cookies. If the sample application is not able to create and write to cache directory, then it will not be able to save cookies to disk. So you will have to fix that first. In your application, you will also need to set EO.WebBrowser.Runtime.CachePath in order to save cookies to disk.

If you do not set EO.WebBrowser.Runtime.CachePath, then all cookies are saved in memory. In previous build if you close all WebViews, then the browser engine is unloaded and all cookies information are discarded even if your application is still running. So if you do not set CachePath and close all tabs and then open another tab later, then all cookies information will be lost. We have just posted a new build that will keep the browser engine in memory for a short period of time even if all WebViews are closed. So in the new build if you close all WebViews but re-open another tab shortly, then the cookie information will still be there.

The best solution is to set CachePath. Once you set CachePath, everything will be save to disk.

Thanks!
ilovetofu
Posted: Friday, January 17, 2014 2:22:24 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
Thanks for your reply, but you may have missed my previous post.

Just to clarify:

(1) I am using the sample application (Visual Studio C# project) and have SET THE CACHEPATH PROPERTY.
(2) I run the sample application (F5) and I CAN SEE FILES THAT HAVE BEEN CREATED IN THE CACHE FOLDER.
(3) In the running sample application I follow the above steps (see previous post). I am still prompted to log in to LinkedIn.
(4) As mentioned, the Demo Application displays a warning about no being able to create cache directory, or is not writable.
(5) I have no way (that I am aware of) of fixing the error with the Demo Application as this is a .EXE file.

eo_support
Posted: Friday, January 17, 2014 9:21:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

That does not make sense. The sample app and the TabbedBrowser demo app are the same thing --- the sample app is the source code of the demo app. The source code is inside "Samples\WebBrowser\TabbedBrowser\CS" (in C#) or "Samples\WebBrowser\TabbedBrowser\VB" (in VB) folder. If you see ""Can not create cache directory or it is not writable", then it means it can not write cache directory. The sample app will not continue in this case. The corresponding source code is in App.xaml.cs. The error is usually caused by a permission issue. That's why we asked you to fix that issue because as soon as you get that error message, the TabbedBrowser sample will not continue. You can load that project with Visual Studio and take a look of the source code to see how it works.

Thanks!
WeeSwe
Posted: Monday, February 10, 2014 2:38:17 PM
Rank: Member
Groups: Member

Joined: 1/20/2014
Posts: 20
eo_support wrote:
Hi,

That does not make sense. The sample app and the TabbedBrowser demo app are the same thing --- the sample app is the source code of the demo app. The source code is inside "Samples\WebBrowser\TabbedBrowser\CS" (in C#) or "Samples\WebBrowser\TabbedBrowser\VB" (in VB) folder. If you see ""Can not create cache directory or it is not writable", then it means it can not write cache directory. The sample app will not continue in this case. The corresponding source code is in App.xaml.cs. The error is usually caused by a permission issue. That's why we asked you to fix that issue because as soon as you get that error message, the TabbedBrowser sample will not continue. You can load that project with Visual Studio and take a look of the source code to see how it works.

Thanks!


I think I have the same problem (with loggin in to LinkedIn). I'm running 2.0.34.0 and our internal CRM system has this "View LinkedIn profile" feature. When I click this button it changes to "Sign in to LInkedIn" and when I click nothing happens. If do this in IE or Chrome it works fine and the next time it knows I'm me. If I navigate directly to LinkedIn in my app I can login and then the issue is no more until I restart the app, and we're back at square 1.
eo_support
Posted: Monday, February 10, 2014 2:53:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi WeeSwe,

Please try to duplicate the same problem with our sample app and then send us the test code. Once we have that we will be happy to investigate further.

Thanks!
WeeSwe
Posted: Tuesday, February 11, 2014 4:14:51 PM
Rank: Member
Groups: Member

Joined: 1/20/2014
Posts: 20
Hi,

Just tried the sample TabbedBrowser and there it works. When I click "login" there is a new tab added. Running in IE10 there is a popup doing the login so there seems to be something that is disabled in the WebControl?
I don't know what you mean by "send us the test code" though...
eo_support
Posted: Tuesday, February 11, 2014 4:48:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

The "popup" is not part of the WebControl. The WebControl is the "rectangle" that displays the web page. When a user clicks a link that opens a new window, a new WebView is created and passed to you. The "hosting" application (which is your application, or TabbedBrowser application for the sample) can choose to discard it, show it in a tab, or show it in a popup, or handle it in whatever way you see fit. As long as user enters the login information, the WebControl will keep it.

If in your application the user has entered the information but EO.WebBrowser didn't keep it, and you have indeed set the cookie path as explained in the previous reply, then you can try to create a test project that duplicates this problem. Once you have such a project, you can let us know and we will tell you where to send it. That's what we meant by "test code".

Thanks!
WeeSwe
Posted: Thursday, February 13, 2014 8:44:53 AM
Rank: Member
Groups: Member

Joined: 1/20/2014
Posts: 20
Hi

This is not issue I'm sure. I have a EO Free license and what I know this limits me to one WebControl. Will this limit restrict me from having this working?
I have set the CachePath to currentDir and now I can see the cookies, but it changes nothing. NOTHING happens when I click "Log in".
- If I run this in Chrome it just works (I don't see anything particular happen) and if I press Shift and click Login a new tab is created.
- If I run this in IE10 it works the same, but if I press shift and click Login I get a popup instead of a new tab.

Are you saying
1. I must "catch" this event
2. I will not be able to get this to work as long as I have a free license

I have asked IT to purchase a single developer license, but I need to see this work first.
eo_support
Posted: Thursday, February 13, 2014 9:15:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

You will need to handle the "NewWindow" event and display the new window (in anyway you want, popup, tab, etc). The free license will display a warning message saying that you can only use a single WebView, but it will still allow you to test the feature.

Thanks!
WeeSwe
Posted: Monday, February 17, 2014 2:28:49 AM
Rank: Member
Groups: Member

Joined: 1/20/2014
Posts: 20
Hi

I understand the concept now and see NewWindows events fires, but need help how do this in VB. The sample code in the VB project has commented code in C# instead of VB.
I want to continue in the same window so I interpret the instructions as:

1. Comment out the e.Accepted = True and the lines above it regarding handling a new tab etc.
2. Uncomment the lines to stay in the current window and the C# code is

'EO.WebBrowser.WebView webView = (EO.WebBrowser.WebView)sender;
'webView.Url = e.TargetUrl;

and I translate that into VB as below, but it doesn't do the trick.

Dim webView As EO.WebBrowser.WebView = sender
webView.Url = e.TargetUrl

When I run I get an empty WebControl saying just "The request was canceled."
ilovetofu
Posted: Monday, February 17, 2014 8:29:13 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
eo_support wrote:
Hi,

That does not make sense. The sample app and the TabbedBrowser demo app are the same thing --- the sample app is the source code of the demo app. The source code is inside "Samples\WebBrowser\TabbedBrowser\CS" (in C#) or "Samples\WebBrowser\TabbedBrowser\VB" (in VB) folder. If you see ""Can not create cache directory or it is not writable", then it means it can not write cache directory. The sample app will not continue in this case. The corresponding source code is in App.xaml.cs. The error is usually caused by a permission issue. That's why we asked you to fix that issue because as soon as you get that error message, the TabbedBrowser sample will not continue. You can load that project with Visual Studio and take a look of the source code to see how it works.

Thanks!


SCENARIO ONE (Demo App):
They are not the same thing where I'm standing! After installing "EOTotal_2013_Setup.exe" there is a "Tabbed Browser" item on the Windows Start menu. The properties of this point to: "C:\Program Files (x86)\Essential Objects\EO.Total 2013\TabbedBrowser.exe". This is an executable program and there is no source code. This is what I referred to as the Demo App. When I run this app, I get an error message saying "Can not create cache directory or it is not writable." If I run the app as "Administrator" its fine. Using this Demi app, (1) I open a Tab and navigate to LinkedIn and sign in. The app is still running, and I then open another Tab and navigate to LinkedIn. Again it takes me to the sign in page.

SCENARIO TWO (Sample C# App):
So I try to use the sample app (C# project) and I change the code to explicitly set the Cache Path to a particular folder. I run the sample project and despite seeing files appear in the Cache folder, I get exactly the same results as I do with the Demo app in Scenario One. That is, even with the app still running, if I open another Tab and go to LinkedIn, it takes me to the sign in page again.

Sorry, but it's so frustrating, I've spend hours trying to get this basic functionality working.

eo_support
Posted: Monday, February 17, 2014 9:08:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

To WeeSwe:

You need to purchase a license in order to continue receiving tech support. We only provide limited tech support to free license users. Sorry about it!

To ilovetofu:

Your scenario one and scenario two are the same. The "Sample C# app" in your scenario two is exactly the full source code of the "Demo App" in your scenario one.
So you can forget about scenario one and focus on scenario two only.

For scenario two, I do not know why you have to change the code to explicitly set the CachePath either. The sample code has already set CachePath.

I am guessing that you have two problems. First it can be some kind of windows permission issues since when you run the demo app as Administrator it works fine. You do not have to run your app as administrator. You only need to make sure your current user has permission to write the CachePath. Second you might have some third party firewall/anti virus application on your machine that is interfering with the network traffic. We have not been able to reproduce the problem that the cookies are not working when in fact files are created inside CachePath folder.

Thanks!
ilovetofu
Posted: Tuesday, February 18, 2014 2:24:21 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 7
I don't have a firewall turned on and I tried even with Anti-Virus disabled. Unless I run the Demo App as Admin it fails to start, yet the Sample C# app runs ok. Maybe this is because the Demo App is located in "C:\Program Files (x86)...whereas the Sample C# app in not under "Program Files".

You say that you don't know why I have to change the code to explicitly set the CachePath, but setting this property is what I was advised to do way back at the beginning of this thread.

Anyway, not to worry, thanks for your assistance.


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.