Welcome Guest Search | Active Topics | Sign In | Register

Webbrowser Blank web page Options
Rick Morayniss
Posted: Monday, May 11, 2015 9:18:06 AM
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.
Rick Morayniss
Posted: Monday, May 11, 2015 11:57:15 AM
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.
eo_support
Posted: Monday, May 11, 2015 4:50:41 PM
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!
Rick Morayniss
Posted: Tuesday, May 12, 2015 8:35:06 AM
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();
Eurice
Posted: Tuesday, May 12, 2015 11:58:01 AM
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
eo_support
Posted: Tuesday, May 12, 2015 3:07:44 PM
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
Rick Morayniss
Posted: Wednesday, May 13, 2015 7:36:52 AM
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.
eo_support
Posted: Wednesday, May 13, 2015 4:41:59 PM
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.aspx

The 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


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.