Re: ASP.NET and COM+
- From: Bennie Haelen <bhaelen@xxxxxxxxx>
- Date: Sat, 03 Sep 2005 16:26:24 -0700
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
Rinaldo F. Junior wrote:
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
.
- Follow-Ups:
- Re: ASP.NET and COM+
- From: Rinaldo F. Junior
- Re: ASP.NET and COM+
- References:
- ASP.NET and COM+
- From: Rinaldo F. Junior
- ASP.NET and COM+
- Prev by Date: ASP.NET and COM+
- Next by Date: Re: ASP.NET and COM+
- Previous by thread: ASP.NET and COM+
- Next by thread: Re: ASP.NET and COM+
- Index(es):
Relevant Pages
|