Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

Webbrowser.navigate() not firing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ryan Ramsey - 19 Aug 2006 18:20 GMT
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
Ryan Ramsey - 22 Aug 2006 18:28 GMT
Anyone have a suggestion?

>I have been chasing this one down for a week and have narrowed it down to a
>machine issue.
[quoted text clipped - 38 lines]
>
> Ryan
Ryan Ramsey - 25 Aug 2006 05:46 GMT
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.Completely);

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.Completly)
-  Allow Webbrowser.Refresh() to trigger the DocumentCompleted event.
>I have been chasing this one down for a week and have narrowed it down to a
>machine issue.
[quoted text clipped - 38 lines]
>
> Ryan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.