Hi!
I am trying to run a simple prototype for a web application that involves
ASP.NET and COM+. The solution is composed from the following projects
ASP.NET -> calls -> .NET Serviced Component -> calls -> .NET Component ->
calls -> Database.
My Serviced Component has the following elements (some code ommited for
clarity):
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual),
Guid("9ED54F84-A89D-4fcd-A854-44251E925F09")> _
Public Interface IProvider
Function GetUsers() As DataSet
End Interface
<ClassInterface(ClassInterfaceType.AutoDual),
Guid("9FK51F44-B19E-4fcd-A288-32901G925P02")> _
Public NotInheritable Class Provider
Inherits ServicedComponent
Implements IProvider
Public Function GetUsers() As DataSet Implements IProvider.GetUsers
Dim var As New DALNet 'Simple DAL component, out of COM+
.............
End Function
End Class
This component is registered under COM+ 1.5 as a Server application, it has
an strong name, fixed assembly version, fixed applicationid, fixed progid
and is installed on the GAC. The component has a Role that contains the
ASP.NET user.
When I call the Serviced Component from ASP.NET I receive the error
"QueryInterface for interface IProvider not found". If I change the
component to run as a Library application this error doesn't occur. I have
read a lot about ASP.NET/COM+ but could not find anything to help me solve
this problem. I really appreciate your help.
Best regards,
Rinaldo F. Junior
Bennie Haelen - 04 Sep 2005 00:26 GMT
Hi Rinaldo,
You should create a new assembly, which contains the IProvider
interface. When you COM+ component runs as a Server Application,
the call to the Serviced Component is remoted, but your client does not
have the Interface locally, hence the "QI for IProvider" failed message.
When you run as a library package, you have your assembly local within
the same appdomain, so you don't have that issue.
Heop this helps,
Bennie Haelen
> Hi!
>
[quoted text clipped - 39 lines]
> Best regards,
> Rinaldo F. Junior
Rinaldo F. Junior - 05 Sep 2005 02:39 GMT
Hi Bennie.
Yes, it makes sense.
Will this new assembly only have the Interface signatures? And I believe
that this new assembly will not be installed on COM+, right?
Thanks for the response!
Rinaldo
> Hi Rinaldo,
>
[quoted text clipped - 54 lines]
>> Best regards,
>> Rinaldo F. Junior