Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2009, 06:43 PM
Authorized User
 
Join Date: Nov 2006
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
Default 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?
__________________
What you don\'t know can hurt you!
 
Old March 5th, 2009, 10:49 AM
Authorized User
 
Join Date: Nov 2006
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
Default 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.
__________________
What you don\'t know can hurt you!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remoting Callback problem downboat BOOK: Professional C#, 2nd and 3rd Editions 2 June 8th, 2011 02:13 AM
NET Remoting problem baga General .NET 0 March 23rd, 2007 12:58 AM
Remoting Problem Pallavs20 General .NET 0 October 21st, 2005 09:12 AM
.Net Remoting Problem farhan_iac General .NET 0 June 11th, 2004 03:13 AM
Remoting problem roypjob .NET Web Services 1 January 20th, 2004 09:12 AM





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