469,955 Members | 1,437 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

Could not instantiate ActiveX control because the current thread is not in a si

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.
Jul 19 '05 #1
0 2350

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Martin Baker | last post: by
5 posts views Thread by Dan | last post: by
5 posts views Thread by Yeti | last post: by
6 posts views Thread by fantum | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.