Re: PLS HELP: ActiveX control / apartment threading error

Discussion in 'ASP .Net' started by Alvin Bruney, Jul 9, 2003.

  1. Alvin Bruney

    Alvin Bruney Guest

    try manually re-registering the component again.
    this seems to be a registration problem before being a thread problem unless
    you are doing some complex stuff

    "VB Programmer" <> wrote in message
    news:...
    > I am using an ActiveX control in a VB.NET user control. I'm using this
    > VB.NET user control inside of an ASP.NET webform. When I run the webform

    I
    > get this error:
    > Could not instantiate ActiveX control

    'd940e4d2-6079-11ce-88cb-0020af6845f6'
    > because the current thread is not in a single-threaded apartment.
    >
    > In my VB.NET usercontrol I put this (after researching on the internet):
    > <STAThread()> Public Sub Main()
    > System.Threading.Thread.CurrentThread.ApartmentState =
    > Threading.ApartmentState.STA
    > End Sub
    >
    > Still get the same error. I know NOTHING about COM.
    >
    > Any ideas?
    >
    > Thanks,
    > Robert
    >
    >
    Alvin Bruney, Jul 9, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sreejumon [MVP]
    Replies:
    1
    Views:
    1,450
    VB Programmer
    Jul 9, 2003
  2. Replies:
    0
    Views:
    871
  3. vml
    Replies:
    0
    Views:
    1,032
  4. Victor

    XML Web Services and Apartment Objects

    Victor, Apr 16, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    96
    Victor
    Apr 16, 2004
  5. Andy Kasotia
    Replies:
    4
    Views:
    197
    Bob Barrows [MVP]
    Dec 9, 2005
Loading...

Share This Page