K
Karthey
Getting "Could not instantiate ActiveX control because
the current thread is not in a single-threaded
apartment. " error while using AxMSComLib control.
I am working on a Web Application. My soultion has 3
projects in it. One of the project is using AXMSComLib.
Since this is web application I count find any Main()
method to add [STAThread].
I did add before the instance of the object AxMSComLib:
"Thread.CurrentThread.ApartmentState = ApartmentState.STA;"
Its not working. Any help will be really appreciated.
the current thread is not in a single-threaded
apartment. " error while using AxMSComLib control.
I am working on a Web Application. My soultion has 3
projects in it. One of the project is using AXMSComLib.
Since this is web application I count find any Main()
method to add [STAThread].
I did add before the instance of the object AxMSComLib:
"Thread.CurrentThread.ApartmentState = ApartmentState.STA;"
Its not working. Any help will be really appreciated.