Re: ASP.NET and COM+



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


"Bennie Haelen" <bhaelen@xxxxxxxxx> wrote in message
news:e0nir7NsFHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
> 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


.



Relevant Pages

  • Re: ASP.NET and COM+
    ... You should create a new assembly, which contains the IProvider interface. ... the call to the Serviced Component is remoted, ... 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. ...
    (microsoft.public.dotnet.framework.component_services)
  • Re: Complex Casting problem in Generics
    ... IProvider<> derives. ... Then you could cast to this Interface instead of casting to ... I should note here that ADAMAuthenticationProviderProfile derives from ...
    (microsoft.public.dotnet.languages.csharp)
  • Interop & role-based security
    ... I've written a serviced component in C# that interacts with some COM ... the standard IConnectionPointContainer interface. ... based security enabled, the calls always fail with E_ACCESSDENIED. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: q: QueryInterface failed ?
    ... I have a Serviced Component that is managing my Shared Properties. ... I guess that you have to call CoImpersonateClientin your Serviced Component, but I'm not sure of that yet. ... > QueryInterface for interface YZComPlusLibrary.IStream failed. ... >public interface IStream ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Creating COM server with C#
    ... What you *can* do is write a "serviced component" (i.e. a COM+ dll that you can host as a COM+ application in "Component Services". ... You just need to decorate the interface and or its methods with following is an example interface. ... Once you have the assembly built you can use the regasm tool to register it. ...
    (microsoft.public.dotnet.languages.csharp)