I have a windows app that has 2 WebView2ControlMBS controls (web1, web2). web1 has a webpage loaded but I’m not doing anything with it. web2 loads a site, grabs the source, parses the data and prints something. This all works fine except for after printing I immediately load a different page in web2 (www.google.com) and it throws a runtime error. I don’t think it has anything to do with web1. It doesn’t like loading that website after it parses the data, how can I stop the runtime error? It is all in a method, I’m wondering if the original page I load is still running something in the background while I try and load the new page. I tried web2.stop and that didn’t seem to help either.
What exception and what message text?
It’s a RuntimeException, ErrorNumber -2137024809, The parameter is incorrect.
And call stack for that exception?
I’m reading that there iis only a certain amount of times a method can call itself. I’m assume my method is just constantly looping and causing the runtime exception. Either way I was able to load a blank page about:blank instead of Google. I guess the blank page is stopping my method from looping. I haven’t got time to look into it more but thank you for the quick replies.
Yes, recursion is limited.
e.g. if you have an event which fires, when a page loads, and there you load a new page, you may cause an endless loop.
That sounds exactly like what I did. Thanks for the help.