C# WebBrowser Control System.AccessViolationException

后端 未结 8 2158
谎友^
谎友^ 2020-12-05 13:41

I have a program that uses the built in webbrowser control. At some point during the usage of this, I\'m not sure at what point, but it appears to be random, I get the foll

8条回答
  •  忘掉有多难
    2020-12-05 13:54

    We're hitting this too. Inconsistently, we'll get this exception.

    Some questions to help narrow this down: are you using any mshtml interfaces directly (e.g. mshtml.dll)? Doing any COM interop directly?

    We've found that calling some of the COM MSHTML interfaces incorrectly can cause this.

    We've also found that doing COM marshalling incorrectly can cause this.

    If there's a bug in the MSHTML interface import that the built-in WebBrowser uses, it can cause this.

    Accessing document IFRAME Elements from another domain can cause this.

    It's possible that making WebBrowser calls when the document isn't quite ready may also cause this.

提交回复
热议问题