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!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
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.aspxInside 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!
|