Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get around running visual studio as administrator in Windows 7 to interact with Internet Explorer

Tags:

vb.net

shdocvw

I'm using SHDocVw.InternetExplorerClass to scrape a webpage. It works fine in XP, but when I try to run it in windows 7 I get an error:

The interface is unknown. (Exception from HRESULT: 0x800706B5)

When I run visual studio in administrator mode it works fine, but the published application has to be run in administrator mode too, which isn't acceptable.

Is there any way to get around running the application in administrator mode?

like image 648
AndyD273 Avatar asked Jan 18 '26 00:01

AndyD273


1 Answers

Do you absoltely need to use SHDocVw.InternetExplorerClass for scraping? Can you just send regular HTTP web requests using System.Net.WebClient or HttpWebRequest? These are the preferred ways. You generally should only use SHDocVw.InternetExplorerClass for scraping if you need to execute scripting technologies like JavaScript or VBScript.

like image 130
Chris Haas Avatar answered Jan 19 '26 18:01

Chris Haas