Accessing two or more Remote object

  • Thread starter Thread starter wan2tri
  • Start date Start date
W

wan2tri

hello, good day to all of you,

hi, im am new in .net , how can i access two or more
object remotely , because currently im only accessing one
object, windows services is the host, i have a
configuration file, on the host and on the client, but it
only support one object,

------host configuration file------------------------
<configuration>
<system.runtime.remoting>
<application name = "HostService">
<service>
<wellknown
type="DOInformationLib.Products,RemoteObject"
objectUri = "DOInformationLib.Products"
mode = "Singleton"
/>
</service>
<channels>
<channel ref = "tcp server" port = "9000">
<serviceProviders>
<formatter ref = "binary"/>
</serviceProviders>
</channel>
</channels>
</application>
<customErrors mode="Off">
</customErrors>
</system.runtime.remoting>
</configuration>
-----------------------------------------------------
my component under "DOInformationLib" object are Customers
and Products, currently i can access only the Products
component, because it is the only declared in the
configuration file, how can i add and use the Customers
component in the configuration file.
DO I HAVE TO ADD IT ON THE type or in the objecturi? HOW?
can somebody please help me and show me code in the
configuration for this problem, THANK,
 
wan2tri,

You can add more objects to be remoted by adding another <wellknown>
element to the file right under the current one. This one would have the
Customer type, like this:

<wellknown type="DOInformationLib.Customers,RemoteObject" objectUri =
"DOInformationLib.Products" mode = "Singleton" />

Hope this helps.
 
Back
Top