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 / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

Help with strange WebBrowser control problem...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David - 17 Oct 2007 04:59 GMT
I'm using the AxSHDocVw.WebBrowser control to download data from a webpage
at work (it's an internal page on my company's intranet).

The page produces a runtime error after a while and the strange thing is
that until the page is refreshed with Internet Explorer, the error keeps
occurring.  I realize no one can debug an application that I can't even
provide details about (I didn't write nor do I have access to it) but what
difference would it make if I used .Refresh with the WebBrowser control
(I've also tried the other WebBrowser control in the toolbox) versus
refreshing with IE?  I can refresh IE on the computer the VB program is
running on or any other computer on the network- either option stops the
page from returning a runtime error.  I've even tried creating a second
control to refresh the page after the error starts occurring but this has
not helped at all.

Any ideas?

(Using Visual Studio 2005 / VB.  The page is coded in VB2005/ASP.)
Tom Shelton - 17 Oct 2007 06:06 GMT
> I'm using the AxSHDocVw.WebBrowser control to download data from a webpage
> at work (it's an internal page on my company's intranet).
[quoted text clipped - 14 lines]
>
> (Using Visual Studio 2005 / VB.  The page is coded in VB2005/ASP.)

I'm not sure what would be causing this issue - but are using the
control to just download data or are you also using it to display the
data?  If you simply downloading it, you might want to look at the
System.Net.WebClient class.  In fact, even if your displaying the
data, maybe you could use this class to download it to a local file,
and then load that into the webbrowser control?

Just a thought.

--
Tom Shelton
David - 17 Oct 2007 11:49 GMT
>> I'm using the AxSHDocVw.WebBrowser control to download data from a
>> webpage
[quoted text clipped - 28 lines]
> --
> Tom Shelton

I am looking at the elements in the document after downloading it using
MSHTML.Document.  I've tried System.Windows.Forms.WebBrowser along with the
ActiveX WebBrowser (I think it was something to do with accessing the MSHTML
document that stopped me from using the former when I wrote the program) but
I'll give System.Net.WebClient a try- perhaps using it to load the "main"
page (see my other response) will fix the problem.
Göran Andersson - 17 Oct 2007 09:14 GMT
> I'm using the AxSHDocVw.WebBrowser control to download data from a webpage
> at work (it's an internal page on my company's intranet).
[quoted text clipped - 14 lines]
>
> (Using Visual Studio 2005 / VB.  The page is coded in VB2005/ASP.)

Check the url that you get for the error message. If you get redirected
to an error page, you don't get back to the original page by refreshing
the error page.

Check if there is a method to refresh the page and not use the cache,
equivalent of pressing ctrl+f5 in the browser.

Signature

Göran Andersson
_____
http://www.guffa.com

David - 17 Oct 2007 11:42 GMT
>> I'm using the AxSHDocVw.WebBrowser control to download data from a
>> webpage at work (it's an internal page on my company's intranet).
[quoted text clipped - 21 lines]
> Check if there is a method to refresh the page and not use the cache,
> equivalent of pressing ctrl+f5 in the browser.

The "main" web page is a list of service requests links.  My program is
loading the main web page and then loading each individual service request
link.  At various points (seems to be random), when attempting to load a
service request page, a runtime error is returned.  I've tried slowing the
program down and am convinced the time between downloading each page is not
the cause of the problem.

When the runtime error is returned, I try downloading the same service
request page again after waiting 30 seconds.  The runtime error will
continue to be returned.

If I open an instance of IE and load the "main" web page, the runtime error
is not returned and the program continues.  IE can be used to load the
"main" web page on the computer running the program or on a different
computer, same results.

What confuses me is why I can not use the web browser control (again, I've
even tried a separate web browser control) to load the web page and get the
same result.  It seems to me that when the page is loaded with IE, something
additional is happening that does not occur when I am loading with the web
browser controls.

Ideas on what that "something additional" could be are what I'm hoping to
find (or a solution, of course).

I hope that clarifies things.
Göran Andersson - 19 Oct 2007 21:42 GMT
> The "main" web page is a list of service requests links.  My program is
> loading the main web page and then loading each individual service request
[quoted text clipped - 22 lines]
>
> I hope that clarifies things.

There is some potentially vital information missing here. What is the
error message?

Signature

Göran Andersson
_____
http://www.guffa.com


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.