473,395 Members | 1,393 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,395 software developers and data experts.

IHtmlDocument TroubleShooting

I am trying to debug my application which is a web scrapping application. I randomly get error will my code is processing web pages. For example I get this error:

An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in
WebClient.exe

Additional information: Exception from HRESULT: 0xC0000005.

I am using HttpWebReponse/Request to retrieve html documents so I load them into an IhtmlDocument2 by using the following declaration and then code:
Dim myDoc As mshtml.IHTMLDocument2 = New mshtml.HTMLDocument
myDoc.close()
myDoc.open("about:blank")
'write the HTML to the document using the MSHTML "write" method...
Dim clsHTML() As Object = {pHTML}
myDoc.write(clsHTML)
clsHTML = Nothing

It has been previously suggested that processing shouldn't continue with the document until it is completely loaded. I know the status of an IhtmlDocument2 can be obtained by viewing the ..IHTMLDocument2.readyState. When I view my code through the debugger the ready state changes from loading to interactive after I write content to the html but it never changes to complete. Does anyone know why this would be and what I should add to my code to fix this problem.

Thank you in advance,
Curtis

Nov 21 '05 #1
2 2153
Curtis

We have a complete sample for this on our website.

http://www.windowsformsdatagridhelp....f-56dbb63fdf1c

I hope this helps,

Cor
Nov 21 '05 #2
Thanks for the example Cor but I already have my app built I am just trying
to figure out why it randomly gives me the error I mentioned in my previous
post. Any help as to why that errror might occur would be greatly
apperciated.

Thanks,
Curtis

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:e6**************@TK2MSFTNGP09.phx.gbl...
Curtis

We have a complete sample for this on our website.

http://www.windowsformsdatagridhelp....f-56dbb63fdf1c

I hope this helps,

Cor

Nov 21 '05 #3

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

Similar topics

2
by: David | last post by:
Hi, This is the first time I use SOAP. Dont really know the exact picture yet. Hope you can shed some lights on me. May I know where should I start troubleshooting if I get the followin error...
1
by: Sean McKaharay | last post by:
I am having a major issue trying to print html document in landscape mode. you can us I.E. page setup when you get prompted for a printer but I don't want to prompt the user. I want to be able to...
1
by: Robert A Riedel | last post by:
I am completely baffled when the following managed exception is thrown: "Object reference not set to an instance of an object" from a nested subroutine when referencing a variable allocated on the...
3
by: Lori McDonald | last post by:
I am logging errors in my web application in a database for troubleshooting (and emailing them to myself) and I am getting this error I cannot understand I have a click event that is generating an...
0
by: Tchek | last post by:
Hello. Does anybody know how to get IHTMLDocument interface from webBrowser1->Document->DomDocument? As I know in C# it looks like this mshtml.IHTMLDocument2 doc2 =...
2
by: siewong | last post by:
Existing Access Database Troubleshooting I am new to access database and inherited an access application and all users who were previously able to use this access file simulataneously are now...
1
by: jobs | last post by:
Re: Troubleshooting Timeout expired. All pooled connections were in use and max pool size was reached. New webservers. win2003. IIS6. asp.net 2.0/ sql server 2005 and Oracle 9i through a 64 bit...
10
by: Daniel Peterson | last post by:
I'm responsible for a pair of IIS 6 webservers that run our production ASP.Net application. We push code on a monthly basis, and about two weeks after our October code push, we started to run into...
3
by: davemerkel | last post by:
Hi folks - wondering if anyone has any pointers on troubleshooting garbage collection. My colleagues and I are running into an interesting problem: Intermittently, we get into a situation where...
4
omerbutt
by: omerbutt | last post by:
hi everyone can any one guide me if there is any add-on related to troubleshooting javascript errors in IE6 regards, Omer Aslam
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.