Thanks for your prompt response!
Yes the component is a series of classes in an assembly that each implement
System.EnterpriseServices.ServicedComponent and yes, I will need to use the
components (let's call this the "business objects") from a remote machine.
Please note that I can already access the business objects from a remote
machine by using VBScript or Visual Basic (i.e., IDispatch is working
perfectly - I even get the objects and interfaces that are exposed
indirectly).
I can also access the business objects from a .NET component on a remote
machine using reflection. The problem is that for this to work I have had to
put the 'business object' assembly on the client machine (for reflection
purposes - reflection occurs before making the invokation). What I am trying
to do is make these calls w/o having to put this assembly on the client
machine. Is this possible?
I did not understand what you meant by "by setting up a virtual directory,
adding a <system.runtime.remoting> section to it with the appropriate
definitions for your COM+ assembly (ServicedComponent)".
Why would I need a virtual directory? Are you suggesting I set up COM+ Web
Services, we would prefer using just straight COM+ (the same mechanism used
by VBScript).
Thanks again,
Charlie
"Paul Glavich [MVP - ASP.NET]" <glav@aspalliance.com-NOSPAM> wrote in
message news:ebenRGxREHA.1644@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view] > If you just want to access the components locally, then just reference the
> .Net project or assembly, whichever one you have.
>
> If you want to access the .Net object via COM+, then it depends how you
have
> written a wrapper class. Is it an assembly that simply inherits from
> ServicedComponent? If this is the case, again simply reference the
> assembly/project and you are away.
>
> If you want to access this component remotely from another machine, then
you
> can provide a simple remoting entry point for the assembly by setting up a
> virtual directory, adding a <system.runtime.remoting> section to it with
the
> appropriate definitions for your COM+ assembly (ServicedComponent), and
> again you should be ok.
>
> Not sure if that answers your question exactly though.
>
> --
> - Paul Glavich
> Microsoft MVP - ASP.NET
>
>
> "Charlie" <JunkMail_Bucket@yahoo.com> wrote in message
> news:uFVKvvlREHA.2976@TK2MSFTNGP10.phx.gbl...
> > First the background:
> >
> > Business Objects (.NET)
> > I have a series of business objects (stateless .NET classes) written to
> > provide our products core functionality. We are trying to expose these
> > business objects such that end-users can write code using their prefered
> > language. A requirement is that the client has to be able to write code
in
> a
> > scriptable language (VBScript, VB).
> >
> >
> > Component Services (COM+)
> > To meet this requirement, we wrote wrapper classes for each business
> object
> > into an assembly and placed it in Component Services and from there
> > generated a client proxy for client installation. On the client machine,
I
> > install this generated MSI and now I can use the business objects from a
> > remote machine using VB script or Visual Basic.
> >
> >
> > Back to .NET
> > Now, what if another client wanted to connect to the serviced component
> > using .NET on the client side. I can't just add a reference to the COM+
> > component's type library because TlbImp cannot generate a .NET wrapper
for
> a
> > type library generated from a CLR assembly. That means that for this to
> work
> > I need to use reflection or type cast the remote object to IDispatch and
> > make IDispatch calls (yuck). If I choose to use reflection, the CLR
> insists
> > on having the remote assembly locally to achieve the reflection before
> > making the remote invokation.
> >
> > Now finally, here's the question:
> > Is there an easier way access exposed API via COM+ from a .NET client?
> >
> > Thanks in advance,
> > Charlie
> >
> >
>
>