|
-
Nov 15th, 2004, 12:23 PM
#1
Thread Starter
Frenzied Member
Force web service to use STAThread
Is it possible to have a web service that uses the single threaded apartment model? Dropping a COM component in the designed, then running, get an error that could not instantiate the ActiveX control because the current thread is not single-threaded apartment.
I know in a Windows Forms app, you can mark with the STAThread attribute, but there's no main method in a web service. Tried to mark the constructor with the attribute, was told I can't do that (methods only). Tried to mark the InitializeComponent method, but it didn't seem to have any effect (same error).
Any help is appreciated.
Thanks,
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|