[ANSWERED] c# – InvalidCastException when reading mshtml.HTMLDocument.Script property
Solution 1 : Turns out all I needed to do was run it as single-threaded apartment. This answer gave me the hint I needed: https://stackoverflow.com/a/19275241/2382032 using System; using System.Reflection; using…