Trying to get webpage source a second time throws exception - vb.net

0

Error message - NotSupportedException was unhandled {"Exception from HRESULT: 0x800A01B6"}

Above error is encountered even if the same url is being tried to get the webpage source a second time to variable Strj. Please assist if there is a way around.

I have already tried:

source = New System.Net.WebClient().DownloadString(cURL)

but this is not an option for me.

Dim cURL As String = "D:\abc.html"
Dim IE As InternetExplorer
IE = New InternetExplorerMedium
IE.Visible = True
IE.Navigate(cURL)
Do While IE.ReadyState <> tagREADYSTATE.READYSTATE_COMPLETE : Application.DoEvents() : Loop

Dim Strj As String

    Strj = IE.Document.body.innerHTML

    IE.Navigate(cURL)
    Do While IE.ReadyState <> tagREADYSTATE.READYSTATE_COMPLETE : Application.DoEvents() : Loop

    Strj = IE.Document.body.innerHTML  '--> Error here
vb.net
internet-explorer
asked on Stack Overflow Aug 14, 2016 by Amresh • edited Aug 14, 2016 by Behzad

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0