This is the error I'm getting:
ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.
I have placed the [STAThread]
before the ProcessRequest
method, but it is still throwing up this error message.
The actual code block is:
// initialize variables
tags = new NameValueCollection();
webBrowser = new WebBrowser();
The error is noted in the new WebBrowser
line.
Any ideas on how to get around this error?