Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 11 Sep 2008 23:27:50 -0700 (PDT),    group: microsoft.public.dotnet.distributed_apps        back       


How to specify server and partition when activating a COM+ component   
I have a ServicedComponent written in VB.NET (.NET 3.5).  From the
client end I need to be able to activate the component on various
servers and in various COM+ partitions on those servers.

I'm aware of the Activator.CreateInstance method of connecting to the
component which lets me specify a server name, but this doesn't seem
to allow me to specify a partition.
Activator.CreateInstance(Type.GetTypeFromProgID("MyApp.MyComponent",
"MyServer", True))

I'm also aware of the BindToMoniker method which lets me specify a
partition ID, but this doesn't seem to allow me to specify the server
name.  (Obviously the ID would be replaced with a valid partition ID
in this example.)
Marshal.BindToMoniker("partition:
{00000000-0000-0000-0000-000000000000}/new:MyApp.MyComponent"))

I've seen many examples that show how to specify the server name in a
moniker when using queued components, but my client application will
be always connected so making the server components queued doesn't
make sense.

I also know that I can change the server name in the COM+ proxy via
the ComAdminCatalog, but I need to allow multiple client applications
to make requests from different servers at the same time, and changing
the server this way affects other client applications that are using
the proxy.

I really need to be able to specify both the server and the partition
when I create the object at the client end, and I've completely hit a
dead end trying to find a solution anywhere on the web.  Does anyone
know how this can be done or if it's even possible?
date: Thu, 11 Sep 2008 23:27:50 -0700 (PDT)   author:   Kermitt

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us