Welcome Guest Search | Active Topics | Sign In | Register

WebBrowserControl - The request was canceled , multiple instances Options
Ron
Posted: Thursday, December 4, 2014 10:29:59 AM
Rank: Newbie
Groups: Member

Joined: 11/30/2014
Posts: 6
We are testing the webbrowser control to analyze websites. We think that there is a problem calling the loadURL function to multiple instances of webbrowser control at once. Some of the URLS are not checked since the failed event is raised with The request was canceled error message.

When we check the program with one instance of webbrowser control it works properly.

Our solution consists of several webbrowser controls which were added to a stack panel in a WPF main window.
Each webbrowser control is assigned to a list of URLS. for each webbrowser the LoadURL function is called , after the complete or the failed event and , the loadURL is called again with a new URL from that list. The WPF window is hosted in a windows service process.


We are checking with the latest version.

any suggestions?
eo_support
Posted: Thursday, December 4, 2014 11:09:12 AM
Rank: Administration
Groups: Administration

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

This appears to be a bug. Can you isolate the problem into a test project and send us the test project? See here for more information about submitting test project:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks
Ron
Posted: Tuesday, December 9, 2014 3:21:38 AM
Rank: Newbie
Groups: Member

Joined: 11/30/2014
Posts: 6
We think that the problem was solved. The next call was from the load_complete or load_failed event , Because the webview was still busy in the previous request the current was canceled .We activated the loadURL with a timer and checked the webview.isloading but that was not sufficient. So we added our own flag. In the success, failed event we reset our flag , we also check the isLoading propery before calling the loadURL again. If a request took too long we called the WebView.StopLoad() and reset our flag.

We tried the service to work for some time it worked properly for a day ,after that we got timeout logs for all our requests , (The webview did not respond to new calls (failed or success event were not called)). We are using the trial version to check to component

do you have a cap on the number of requests in the trial version?

thanks
Yannou
Posted: Tuesday, December 9, 2014 7:41:17 AM
Rank: Member
Groups: Member

Joined: 7/28/2014
Posts: 10
Hello,
Im facing the same issue when I start multiple ( 2 or 3 ) WebBrowser at the same time EO crash; this happen only when these WebBrowser are the firsts ones started in my app.

By the way this is not happening every time its pretty random.



Regards
eo_support
Posted: Tuesday, December 9, 2014 12:58:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Ron wrote:
We think that the problem was solved. The next call was from the load_complete or load_failed event , Because the webview was still busy in the previous request the current was canceled .We activated the loadURL with a timer and checked the webview.isloading but that was not sufficient. So we added our own flag. In the success, failed event we reset our flag , we also check the isLoading propery before calling the loadURL again. If a request took too long we called the WebView.StopLoad() and reset our flag.

We tried the service to work for some time it worked properly for a day ,after that we got timeout logs for all our requests , (The webview did not respond to new calls (failed or success event were not called)). We are using the trial version to check to component

do you have a cap on the number of requests in the trial version?

thanks


Thanks for the update. That makes perfect sense. IsLoading is primarily for UI purpose (for example, to display a spinning animation when the loading is in progress), so it is updated asynchronously and is not accurate. On the other hand, LoadCompleted and LoadFailed can be used to track LoadUrl reliability.

The trial version does have a cap on the number of requests. After that LoadUrl will stop working. You will need to restart your app in order to reset the cap.

Thanks!
eo_support
Posted: Tuesday, December 9, 2014 1:00:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Yannou wrote:
Hello,
Im facing the same issue when I start multiple ( 2 or 3 ) WebBrowser at the same time EO crash; this happen only when these WebBrowser are the firsts ones started in my app.

By the way this is not happening every time its pretty random.



Regards


Hi,

Please check whether you are trying to load multiple WebView in different threads. EO.WebBrowser is can be used in multi-thread environment but the object itself is not multi-thead safe. Specifically, each WebView is associated to a specific thread and it can not be called directly from another thread. If you need to use multiple WebView in multiple threads, you can take a look of EO.WebBrowser.ThreadRunner object.

If that's not the problem, then we will need to isolate the problem into a test project in order for us to look further. Please see here for more instructions on how to submit a test project:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!


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.