Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / September 2005

Tip: Looking for answers? Try searching our database.

ASP.NET and COM+

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rinaldo F. Junior - 03 Sep 2005 05:21 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.