Welcome Guest Search | Active Topics | Sign In | Register

WebBrowser LoadUrlAndWait issue in 8.1 Options
Rick Morayniss
Posted: Friday, April 24, 2015 11:54:39 AM
Rank: Advanced Member
Groups: Member

Joined: 12/30/2013
Posts: 68
I have added tracing to my app regarding a few users unable to get to my website and here is what I found.

When I run webView1.LoadUrlAndWait from my frmMain_Shown event
the webView1_BeforeNavigate event gets run and finishes correctly.
But the handle of the process is no longer returned to "webView1.LoadUrlAndWait "

I know this because I have a log before and after the webView1.LoadUrlAndWait process is run, but the first is the only one that runs.
webView1_IsLoadingChanged also never gets run.

As I stated earlier, this issue has only happened on 8.1 machines, I am sure not all.
I also verified the user has access to the website by starting the webpage from chrome.
eo_support
Posted: Friday, April 24, 2015 1:24:21 PM
Rank: Administration
Groups: Administration

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

Please try to call LoadUrlAndWait from a "normal" event. There are several special events in Windows that may block other things if you block inside it. Example of "special" events includes WM_PAINT (which triggers Paint event)), WM_ACTIVATE (which triggers Show event), WM_SETFOCUS/KILLFOCUS (which triggers focus related event). Generally you should not block inside these events. Other event such as button click or timer event is fine. In your case, you should not trigger a load just because the form is shown (this way it will be triggered every time you hide and then show the form). If you must load the Url in Show event, call LoadUrl and then do the rest inside LoadCompleted event.

Thanks!
Rick Morayniss
Posted: Friday, April 24, 2015 3:29:52 PM
Rank: Advanced Member
Groups: Member

Joined: 12/30/2013
Posts: 68
I have made the changes as you have suggested. As you can see I have created a timer that runs the "tick" at the 1.5 second mark.
My stack trace print out the Start "LoadUrlAndWait", but not the "End LoadUrlAndWait". So the website for these 8.1 users never loads


private void StartTime_Tick(object sender, EventArgs e)
{
StartTime.Enabled = false;
string myWorkingFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
printStackTrace(Constants.ClientWebUIURL + "?ShellVersion=" + version.Major + "." + version.Minor + "." + version.Build + "." + version.MinorRevision, "Start LoadUrlAndWait");
webView1.LoadUrlAndWait(Constants.ClientWebURL + "?ShellVersion=" + version.Major + "." + version.Minor + "." + version.Build + "." + version.MinorRevision);
printStackTrace(Constants.ClientWebURL + "?ShellVersion=" + version.Major + "." + version.Minor + "." + version.Build + "." + version.MinorRevision, "End LoadUrlAndWait");

}
eo_support
Posted: Friday, April 24, 2015 4:58:12 PM
Rank: Administration
Groups: Administration

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

Your code looks fine to us. So we are not sure what else to tell you. You can try to isolate the problem into a test project and send the test project to us. Once we have that we will investigate further. See here for test project guidelines:

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.