473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Webbrowser.navigate() not firing

I have been chasing this one down for a week and have narrowed it down to a
machine issue.

I have the following code:
webBrowser.Navigate(http://finao.net/post_dkp.php?database=40);

Basically all this script does is create an xml output file.

After the navigate, the function stops and is triggered again when
webbrowser_DocumentCompleted fires and then the XML file is read by the
program

Here is the odd thing... DocumentCompleted ALWAYS fires (as if the navigate
fires).

On machine one, everything works fine, the post_dkp.php script is run, and a
new xml file is created. I know this because in the XML file i embedded a
timestamp so i know the data is fresh.

On machine two, the navigate fires because DocumentCompleted fires, but the
script hasn't executed because the XML file contains stale information.

My question: How do I debug this as webBrowser.Navigate does not return any
detailed status's.

The client seems to think the script is being executed but obviously it is
not.

Im thinking the 2nd machine might have a firewall issue preventing the
navigate but when DocumentCompleted fires a Dataset.ReadXML() ALWAYS works
(the xml file is read 100% of the time despite being stale or not). This
leads me think it might NOT be a firewall issue.

To confuse things even more... Sometimes it works on machine two, but 90% of
the time I get the stale info.

Please help. I am unfamiliar with all the little tools in the suite to debug
this kind of stuff but I would really appreciate some help or some guidance
to how to do this better.

Ryan

Aug 19 '06 #1
2 17918
Anyone have a suggestion?

"Ryan Ramsey" <ry********@yahoo.comwrote in message
news:y5******************************@adelphia.com ...
>I have been chasing this one down for a week and have narrowed it down to a
machine issue.

I have the following code:
webBrowser.Navigate(http://finao.net/post_dkp.php?database=40);

Basically all this script does is create an xml output file.

After the navigate, the function stops and is triggered again when
webbrowser_DocumentCompleted fires and then the XML file is read by the
program

Here is the odd thing... DocumentCompleted ALWAYS fires (as if the
navigate fires).

On machine one, everything works fine, the post_dkp.php script is run, and
a new xml file is created. I know this because in the XML file i embedded
a timestamp so i know the data is fresh.

On machine two, the navigate fires because DocumentCompleted fires, but
the script hasn't executed because the XML file contains stale
information.

My question: How do I debug this as webBrowser.Navigate does not return
any detailed status's.

The client seems to think the script is being executed but obviously it is
not.

Im thinking the 2nd machine might have a firewall issue preventing the
navigate but when DocumentCompleted fires a Dataset.ReadXML() ALWAYS
works (the xml file is read 100% of the time despite being stale or not).
This leads me think it might NOT be a firewall issue.

To confuse things even more... Sometimes it works on machine two, but 90%
of the time I get the stale info.

Please help. I am unfamiliar with all the little tools in the suite to
debug this kind of stuff but I would really appreciate some help or some
guidance to how to do this better.

Ryan

Aug 22 '06 #2
A few people asked me if i solved this.. Im surprised MS didn't catch this.

Basically Webbrowser.Navigate(url) ONLY fires if the url changes. If it
doesn't change it uses a cached version of the web page.

This is odd because it doesn't seem to check the web page for changes.

I got around this by comparing Webbrowser.url to 'url'.. If it was different
I would call the navigate. If it was the same, i would call
webBrowser.Refresh(WebBrowserRefreshOption.Complet ely);

The other troublesome thing is the Refresh does not trigger
DocumentCompleted which I think is lame.

Recommedations to MS:
- Create an option in Webbrowser.Navigate to FORCE web page executes
despite the url (ie.
Webbrowser.Navigate(urll,WebBrowserRefreshOption.C ompletly)
- Allow Webbrowser.Refresh() to trigger the DocumentCompleted event.
"Ryan Ramsey" <ry********@yahoo.comwrote in message
news:y5******************************@adelphia.com ...
>I have been chasing this one down for a week and have narrowed it down to a
machine issue.

I have the following code:
webBrowser.Navigate(http://finao.net/post_dkp.php?database=40);

Basically all this script does is create an xml output file.

After the navigate, the function stops and is triggered again when
webbrowser_DocumentCompleted fires and then the XML file is read by the
program

Here is the odd thing... DocumentCompleted ALWAYS fires (as if the
navigate fires).

On machine one, everything works fine, the post_dkp.php script is run, and
a new xml file is created. I know this because in the XML file i embedded
a timestamp so i know the data is fresh.

On machine two, the navigate fires because DocumentCompleted fires, but
the script hasn't executed because the XML file contains stale
information.

My question: How do I debug this as webBrowser.Navigate does not return
any detailed status's.

The client seems to think the script is being executed but obviously it is
not.

Im thinking the 2nd machine might have a firewall issue preventing the
navigate but when DocumentCompleted fires a Dataset.ReadXML() ALWAYS
works (the xml file is read 100% of the time despite being stale or not).
This leads me think it might NOT be a firewall issue.

To confuse things even more... Sometimes it works on machine two, but 90%
of the time I get the stale info.

Please help. I am unfamiliar with all the little tools in the suite to
debug this kind of stuff but I would really appreciate some help or some
guidance to how to do this better.

Ryan

Aug 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: daniel.manges | last post by:
I need to use a Windows.Forms.WebBrowser in a separate thread. (I'm not using the GUI, I just want to navigate to a page and get the ..Document.Body.InnerText property of the WebBrowser - maybe...
7
by: Dave Booker | last post by:
I am using a WebBrowser object in my .NET 2.0 application, but it is not shown to the user. Every time a timer event triggers it to perform a m_WebBrowser.Navigate() I get that classic IE 'click'...
2
by: FishingScout | last post by:
I have a small html file that I have added to my project. When I added "sample.html", I set the build action to "embedded resource". In the application I would like to do something like this (...
2
by: Lance | last post by:
Hi All, Given a collection of links, how can I send them to a WebBrowser Control so that I can manipulate it's document? Ok, that's way too simplified of a question. I know how to send a link...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
2
by: Vadim Rapp | last post by:
Hello, I want to create a webbrowser object programmatically, navigate to a URL, and then analyze the document. I create the following code (simplified): Dim ie as new webbrowser...
0
by: Bob Bryan | last post by:
After adding a WebBrowser control to my form (VS 2005), and the following 2 lines of code to a click event: webBrowser1.Navigate(new Uri(NextURL)); String PageData = webBrowser1.DocumentText; ...
5
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I am having problems interacting with flash objects (i.e., Adobe Flash Player 9) in web pages when using a System.Windows.Forms.WebBrowser control. The flash objects always seem to display...
0
by: scottietrek | last post by:
I have a webbrowser control that allows me to save username and password infromation for a proxy server and i have been successful in changing the system default proxy for my application. What i now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.