|
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.
|
|
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!
|
|
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"); }
|
|
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.aspxThanks!
|
|