Calling COM+ component from webservice

G

Greg Busby

I am a newbie to ASP.NET and webservices. I have a webservice that is
calling a C# dll. This dll then calls methods in a VB COM+ component.
The COM+ component is not instantiating correctly. The return value of
the called function is an ADO recordset. Looking at the value of the
variable in the watch window, it is undeclared. So, the function is not
completing. I ran this code from a straight WinForms application and it
worked fine. Is there something about webservices that would prevent me
from doing what I am attempting? I got the following message in he
output window:

Interop.Grading QueryInterface for interface Grading._clsGrading
failed. Since the calling of the COM+ component works fine in a
WinForms app, is the problem one of security/permissions?

Thanks in advance for any assistance.

Greg
 
B

bruce barker

unlike Winforms (or WebForms which support the aspcompat flag), calling STA
(vb6) com components is not directly supported with webservices. you need
to create your own STA thread to manage calls to the component. you only
other option is to host the com object in a com+ application (though there
is a big performance cost).

-- bruce (sqlwork.com)


| I am a newbie to ASP.NET and webservices. I have a webservice that is
| calling a C# dll. This dll then calls methods in a VB COM+ component.
| The COM+ component is not instantiating correctly. The return value of
| the called function is an ADO recordset. Looking at the value of the
| variable in the watch window, it is undeclared. So, the function is not
| completing. I ran this code from a straight WinForms application and it
| worked fine. Is there something about webservices that would prevent me
| from doing what I am attempting? I got the following message in he
| output window:
|
| Interop.Grading QueryInterface for interface Grading._clsGrading
| failed. Since the calling of the COM+ component works fine in a
| WinForms app, is the problem one of security/permissions?
|
| Thanks in advance for any assistance.
|
| Greg
|
|
|
|
| Don't just participate in USENET...get rewarded for it!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top