|
Rank: Advanced Member Groups: Member
Joined: 12/30/2013 Posts: 68
|
I have received a complaint from a number of users and I am able to duplicate the issue. At times, when a user starts my app adn tries to ge to the login screen, they are greeted by a blank page. The webView1_BeforeNavigate fires first correctly The webView1_IsLoadingChanged runs correctly with the correct URL. and finally, the webView1_LoadCompleted finishes and even gives the correct url at e.task.URL but the screen is blank.
|
|
Rank: Advanced Member Groups: Member
Joined: 12/30/2013 Posts: 68
|
I have added int statusCode = task.HttpStatusCode; to my code, and no matter what I do, I only get back a code of 0. I then loaded your web browser sample application and put in a fake web address into the address bar. The webbrowser did not give me a 404 error, or any other error. It just sat on your homepage and did nothing.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We have just posted a new build that should fix the HttpStatusCode issue. You can download it from our download page. However the blank page issue might be an unrelated issue. So if the problem continues, please try to isolate the problem into a test project and send us the test project. We will then investigate further.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/30/2013 Posts: 68
|
While the webbrowser now states "A connection attempt was refused.", I still get a HttpStatusCode of 0. Here is my code.
NavigationTask task = webView1.LoadUrl("http://www.badwebsitefortesting.com" + "?ShellVersion=" + version.Major + "." + version.Minor + "." + version.Build + "." + version.MinorRevision); int statusCode = task.HttpStatusCode; CustomDialog.SOLARMessageBox.Show(statusCode.ToString()); task.WaitOne();
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
Hello, We also face a similar issue, sometimes (and randomly) the webview is blank. Our app open and close many webviews by the way and this seems to happen once/twice a day
Regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Rick Morayniss wrote:While the webbrowser now states "A connection attempt was refused.", I still get a HttpStatusCode of 0. Here is my code.
NavigationTask task = webView1.LoadUrl("http://www.badwebsitefortesting.com" + "?ShellVersion=" + version.Major + "." + version.Minor + "." + version.Build + "." + version.MinorRevision); int statusCode = task.HttpStatusCode; CustomDialog.SOLARMessageBox.Show(statusCode.ToString()); task.WaitOne(); HttpStatusCode should be 0 when "a connect attemp was refused" occurred. HttpStatusCode is a response code sent to you by the server, so if a connection can't even be made with the server, HttpStatusCode of course will be zero. Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 12/30/2013 Posts: 68
|
No matter what happens I get an HttpStatusCode of 0. I need a way to put up a friendly error if the page cannot connect. A blank page with "A connection attempt was refused." is not sufficient.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, You need to handle this event: http://www.essentialobjects.com/doc/6/eo.webbrowser.webview.loadfailed.aspxThe event argument's ErrorCode should tell you the nature of the error. You can then set the event argument's ErrorMessage property based on the value of the ErrorCode. If you do not do anything, the default error message (such as "A connection attempt was refused") will be used. Note that this error code has nothing to do with HttpStatusCode. These are two totally different things. HttpStatusCode was an issue related to another post from another user, it has nothing to do with you. Thanks
|
|