Welcome Guest Search | Active Topics | Sign In | Register

webView_LoadFailed - ErrorCode.TimedOut Options
Christian Porzio
Posted: Monday, July 16, 2018 9:29:21 AM
Rank: Advanced Member
Groups: Member

Joined: 10/4/2016
Posts: 104
Hi,

In some of our environment we are running into Timeout issues when loading certain of our pages, we know this is due to some latency in some proxy servers but we do not have control over this infrastructure. Beside when loading that same page with IE or Chrome, it is rendered fine.

Is there a configuration or a chromium init parameter that would extend which ever timer triggers the ErrorCode.TimeOut?

The method LoadUrl from WebView does return a NavigationTask which provides a WaitOne(timeout)

Although I have not fully experimented with this approach, even if I wait on my task (say indefinitely) to complete, would not the handler webView_LoadFailed be triggered anyway and when this happens, now my page won't keep trying to load my URL.

In addition, I do want the LoadUrl to be asynchronous. I do not want to block my application while the browser waits for the page. So will this still work if I invoke the LoadUrl from another thread than my main graphic thread?

I really only try to solve this timeout issue mentioned earlier, so far this NavigationTask approach seemed my best bet but I am not even sure how to use it. Do you have any concrete example of it? Or an idea how to workaround this timeout situation?

Thank you!
eo_support
Posted: Monday, July 16, 2018 7:18:12 PM
Rank: Administration
Groups: Administration

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

Yes. NavigationTask is your best option for this issue. The browser engine has its own load time out value that is hard coded and is not configurable. This is not the same value you pass to NavigationTask.WaitOne.

If you do not want to block your application, you have two choices:

1. Handle the WebView's LoadFailed/LoadCompleted;
2. Use this method to attach a complete handler:

https://www.essentialobjects.com/doc/eo.base.waitabletask.ondone_overloads.aspx

Inside your OnDone handler, you can check the NavigationTask's ErrorCode to see if the load was successful.

Hope this helps. Please feel free to let us know if you still have any more questions.

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.