I'm trying to set up the following:
1. a C# server is instantiated by our hosting application on computer A.
2. a C# client on computer B gets a reference to the server with nothing
more than the server's URI (or URL, I still don't see the difference).
I've found some good documentation on how to create a server that derives
from System.MarshalByRefObject, and activate it with the desired URI using
System.Rumtime.Remoting.RemotingConfiguration. I cannot, however, find how a
client can get an object reference by URI. I am finding plenty of examples
where the server is just-in-time created after a client request, but I need
the server to run even if there are no clients.
Another stupid question, how do I read a server's URI after activation? I
see that the System.Runtime.Remoting.Channels.ChannelServices has a static
GetUrlsForObject method, is that how I do it? I guess I'm old fashioned in
that I believe that if an object has a property, it should expose it through
accessors - you shouldn't have to pass your object into a static method on a
third party object.