Ken Kolda
8/6/2004 3:23:00 PM
Other than the fact that all 10 of your RegisterWellKnownServiceType() calls are attempting to register the same type (I assume that's just a cut-and-paste error), this is right way to do this.
That said, since these are all single-call objects, that often means the classes are stateless andmore or less represent simple APIs into your system. If hat's the case, you may be able to combine some of your classes to reduce the total number of types exposed. Obviously, that would be your call based on what those objects do and how independent they need to be.
Ken
"ypul" <ypul@yahoo.com> wrote in message news:eOYMqZ5eEHA.3428@TK2MSFTNGP11.phx.gbl...
I have gone through some examples of remoting
on the server we have classes
-------------------
Class MyRemoteObject
Inherits MarshalByRefObject
Implements IMyRemoteObject
--------------
Module ServerStartup
Sub Main()
Console.WriteLine("ServerStartup.Main():Server started ")
Dim chnl As New HttpChannel(1234)
ChannelServices.RegisterChannel(chnl)
RemotingConfiguration.RegisterWellKnownServiceType(GetType(MyRemoteObject),"MyRemoteObject.soap ",WellKnownObjectMode.SingleCall)
------------------------
my question is
what if I have 10 different classes on my server machine say :-
MyRemoteObject1 , MyRemoteObject2............,MyRemoteObject 10
Then do I need to write the code this way in the server class (as given below)?
RemotingConfiguration.RegisterWellKnownServiceType(GetType(MyRemoteObject),"MyRemoteObject1.soap ",WellKnownObjectMode.SingleCall)
RemotingConfiguration.RegisterWellKnownServiceType(GetType(MyRemoteObject),"MyRemoteObject2.soap ",WellKnownObjectMode.SingleCall)
.
.
.
RemotingConfiguration.RegisterWellKnownServiceType(GetType(MyRemoteObject),"MyRemoteObject10.soap ",WellKnownObjectMode.SingleCall)
Hope u undestand the question .
i am sure there is some other proper solution to make the classes available on the server ...........
can u please help me ?