I have a program that reads some data from a website, then clicks a link on that website and reads data again from the new site after navigation.
Everything works fine as long as the program is started with admin rights. The problem occurs when I start the program without admin rights. Here is some code:
void ReadHTML(string url)
{
try
{
InternetExplorer ie = new InternetExplorer();
IWebBrowserApp wb = (IWebBrowserApp)ie;
wb.Visible = false;
wb.Navigate(main.pathHcmOverview, null, null, null, null);
while (wb.Busy) ; // Here the program crashes already with exit code 0x800706ba
HTMLDocument doc = (HTMLDocument)wb.Document;
// Do something with the doc [I cut the code here as it is not relevant for the problem]
wb.Quit();
}
catch (Exception err)
{
}
}
The navigation command works, but the next command throws an error: "RPC Server not available - 0x800706ba".
Now my question: Can I use the code above only with admin rights? I did not find any information on that yet. And if so, is there an alternative to accomplish my goal without admin rights?
I was able to resolve the problem by changing the following line
InternetExplorer ie = new InternetExplorer();
into
InternetExplorerMedium ie = new InternetExplorerMedium();
Tests worked fine after that. I will read into the documents now about the exact differences between those two.
User contributions licensed under CC BY-SA 3.0