p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# 2005 (http://p2p.wrox.com/forumdisplay.php?f=138)
-   -   Problem with Remoting (http://p2p.wrox.com/showthread.php?t=72921)

David_0223 February 24th, 2009 06:43 PM

Problem with Remoting
 
I'd like to use remoting to alert a users desktop when an event occurs on a server.

Having never used remoting before I reviewed a couple of samples on the subject. And I have a question.

How do I access the client activated object on the remote-server application?

David_0223 March 5th, 2009 10:49 AM

Problem with Remoting
 
I resolved the issue I was having. It turns out that the service that runs on the remote server doesn't need to know much about the object that will be instantiated on itself. Just the type and name that the object will be created as.

After instantiating and registering the Channel. You setup the listener and you are through with the server.
Code:


RemotingConfiguration.RegisterWellKnownServiceType(
  System.Type.GetType("RemoteXport.myRemoteClass, RemoteXport"),
  "RemoteTest", WellKNownObjectMode.SingleCall);

What I learned was that the remote class can be as complicated as you like. In my case I wanted to alert the user when an event occured on another server. So the remote server class runs on the user's machine and listens. The remote client runs on the machine on which important events will occur. When the event happens, the remote client is started up which instantiates the remote object on the user's machine. That object can open a windows form to alert the user, sound alarms or launch another appllication all of which depend on the access rights of the object and the user it runs as.

That's where I'm stuck now, figuring out how to navigate the complex security restrictions in a corporate environment. But this will be the subject of another post.


All times are GMT -4. The time now is 01:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.