Hey Jason,
I won't claim to be an expert on remoting but have been recently learning a
lot about it...
Remoting doesn't require IIS on either side, but may be simpler to use it if
you're wanting the security features rolled for you. What I've been finding
is that the more difficult side of remoting is determining when to use which
function/option than it taking hundreds of lines of code to set up.
The only resource I've been using is a test-prep book. The following
probably won't be enough to code everything, but as an idea of how much (or
little) is involved, basically, you register the server with something like:
TcpServerChannel channel = new TcpServerChannel(1234);
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(MyProject.MyClass),"MyClass",
WellKnownObjectMode.SingleCall);
This defines the protocal and port on which the service is going to listen
for requests. On the client side, you add project references to the server
assembly, then do something like the following to create an instance of the
service (or more accurately a proxy to it):
TcpClientChannel channel = new TcpClientChannel();
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownClientType(
typeof(DbConnect), "tcp://j2k:1234/MyClass");
MyClass ServerOjbect = new MyClass();
Now you can work with the ServerObject as any other.
Overall, it seems to involve as much or more work getting the references and
"usings" in place than the amount of coding to make your objects remotable!
I hope that's at least a start...
John
"Jason Schneekloth" <Ja**************@discussions.microsoft.com> wrote in
message news:E8**********************************@microsof t.com...
Hey all....
I'm writing an app that needs to send/recieve data from other applications
running, I guess you could think of it as a data relay broker between
running applications. I had planned on creating a windows service to handle this,
but I found out that I cannot directly send/recieve data here, i can only
signal it. First off, am I wrong in this assumption? Secondly, I have
also noticed some people talking about creating a remoting application to
handle this task (which is controlled by the windows service I would assume).
Does anyone know of some examples here or some good references so I could brush
up on my remoting?? If I create a .NET remoting app which would act as the
broker, does the user need IIS installed?
Thanks in advance, Jason