I have a dll which parses some web site. This component uses WebBrowser control from Windows forms with using Navigate() method.
Also I have a WCF hosting in IIS 7 and with basicHttpBinding.
But when I call my WCF method which use the dll with WebBrower from client I have such bug message:
ActiveX control ‘8856f961-340a-11d0-a96b-00c04fd705a2’ cannot be instantiated because the current thread is not in a single-threaded apartment.
Is any way to resolve this unpleasant situation ?
Furtunately, I found an answer for the question. This code helps me:
And such attributes for the class like:
In any option variation didn’t help me.