.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Remoting and events

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :WPF


I have a problem to solve that I am sure many others have solved before me. I would like to hear how you have solved it, and what the pros and cons are versus other alternatives.

The problem is this: An entity in a client-server application is to be modified by the server, but the client needs to take action in response to the changes. Ideally I would like the entity object to offer events that can be subscribed to whether on the server or on the client.

We are using remoting, so particulars may apply, although in general the problem of course comes from the client-server nature of the system.

I am unsure if making use of two-way remoting is the way to go. I am not (at least not yet!) talking about pushing changes from one client to another. Rather, a client provides an entity object, the server updates it, and the SAME client responds to changes in its state. It seems to me I would need some kind of "deferred" event firing mechanism, and I suppose I could implement this in my entity objects. Perhaps put event information in a queue when normally one would raise the event, so they can be raised later instead.

If anyone has any ideas or in paritcular *experience* with solutions to this problem, I'd be very interested to hear your POVs.

View Complete Post

More Related Resource Links

Vb.net remoting Error while registering the events on clients.?

i m getting the following error while registering the events on clients.
"An error occurred creating the form. See Exception.InnerException for details. The error is: Exception has been thrown by the target of an invocation."

'My Coding
Dim chan As HttpChannel
Dim serverProv As New BinaryServerFormatterSinkProvider
Dim clientProv As New BinaryClientFormatterSinkProvider
Dim props As IDictionary = New Hashtable
serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.…
props("port") = 0
'props("name") = "ChatApplication"
chan = New HttpChannel(props, clientProv, serverProv)
ChannelServices.RegisterChannel(chan, False)

theManager = CType(Activator.GetObject(Type.GetType("… "http://localhost:7777/ChatApplication")… InBetween.Manager)

AddHandler Me.theManager.evtReceiveText, Addre

Raise Events in remoting object


Hello i m new to .Net Remoting and I have following scenario and don't know how to deal with event raised on service side and handled on client side.

My remote object starts controller and controller further starts scheduler

Scheduler is responsible for scanning all jobs in queue and adding more jobs in a queue.

Queue member raises an event which i want to handle on client side

Could anyone help me to get solution for this


Observer pattern via remoting and events


I have a remote object, using the observer pattern, that calls a NOTIFY method on the registered client that in turn displays a message box with the message being sent by  the other clients.  All works fine.  My question is this - I would like the NOTIFY method on the registered client to trigger a client side event, instead of displaying a messge box.  However whenever I change to triggering an event within the NOTIFY method it seems to hang the entire client application. Why is this?  Any help would be appreciated. Below is a sample of the client side code called via remoting from server.

        public static GlobalEventListener<LockChangeArg> gel = GlobalEventListener<LockChangeArg>.Instance;
public void Notify(object anObject)         {   &nb

WCF Tutorial - Events and Callbacks

we described how to make a very simple client/server application where clients would call functions on the server through a shared interface. In this tutorial, I'm going to expand that application to allow the server to execute functions on the client by using callbacks. Essentially, this is WCF's mechanism to allow events to be raised from the server to it's connected clients.

Delegates and events in c#.net

People often find it difficult to see the difference between events and delegates. C# doesn't help matters by allowing you to declare field-like events which are automatically backed by a delegate variable of the same name. This article aims to clarify the matter for you. Another source of confusion is the overloading of the term "delegate". Sometimes it is used to mean a delegate type, and at other times it can be used to mean an instance of a delegate type. I'll use "delegate type" and "delegate instance" to distinguish between them, and "delegate" when talking about the whole topic in a general sense.

How to listen to events within a listview



I've got a listview and I've put a button control in one of the columns, I'm trying to figure out how I have listen to the button click within a certain row, but can't see the button in the dropdown for the IDs I can generate events for.

I'd like to get the primary key of the row that's been clicked on and then run a sql statement against it.

Any help would be appreciated.

UI Frontiers: Multi-Touch Manipulation Events in WPF


Multi-touch has progressed from being a futuristic prop of sci-fi films to a mainstream means of user interface. We'll show you how support for multi-touch in Windows 7 has filtered down and settled into various areas of the .NET Framework.

Charles Petzold

MSDN Magazine August 2010

Event Tracing For Windows: Core Instrumentation Events in Windows 7, Part 2


In Part 2, the authors cover core OS Event Tracing for Windows (ETW) events as well as present simple scripts to demonstrate a few basic accounting techniques on some of the OS events introduced.

Alex Bendetov, Insung Park

MSDN Magazine October 2009

Event Tracing for Windows: Core Instrumentation Events in Windows 7


In the first article of a two-part series, the authors present a high-level overview of the ETW technology and core OS instrumentation.

Alex Bendetov, Insung Park

MSDN Magazine September 2009

Advanced WPF: Understanding Routed Events And Commands In WPF


See how routed events and routed commands in Windows Presentation Foundation form the basis for communication between the parts of your UI.

Brian Noyes

MSDN Magazine September 2008

Office Space: Events in SharePoint 2007


Windows SharePoint Services (WSS) 3.0 provides a new and improved infrastructure for handling server-side events. In this installment of Office Space, we look at techniques for hooking up Before Events and After Events using both Features and code.

Ted Pattison

MSDN Magazine November 2007

WCF Essentials: What You Need To Know About One-Way Calls, Callbacks, And Events


Object and component-oriented programming have only one way for clients to call a method, but Windows® Communication Foundation introduces two more. In this article Juval Lowy explains how they work.

Juval Lowy

MSDN Magazine October 2006

Around the Horn: Engineer a Distributed System Using .NET Remoting for Process Intensive Analysis


Before the Microsoft .NET Framework, creating a distributed cluster of computers to perform scientific analysis was expensive in terms of hardware, programming and debugging time, and maintenance. You had to purchase expensive servers, spend time debugging network communication, design a distributed system completely different from a system deployed locally, and maintain a melting pot of error handling, data acquisition, networking, and analysis code. In this article, the author shows you how he was able to engineer a distributed computing system in C# to perform analysis of real-world data continuously acquired at high sampling rates, thanks to the .NET Framework.

Nate D'Anna

MSDN Magazine May 2005

Remoting: Managing the Lifetime of Remote .NET Objects with Leasing and Sponsorship


Leasing and sponsorship is the solution for managing the lifecycle of a remote object in .NET. Each object has a lease that prevents the local garbage collector from destroying it, and most distributed applications rely upon leasing. There are several ways in which objects and clients can extend the lease, including dedicated sponsor objects. In this article, the author explains leasing, shows how to configure it, and how it relates to the various remoting activation models. He then discusses design guidelines and options, along with their impact on throughput and performance. Additionally, he introduces a helper class used to automate the management of lease sponsors.

Juval Lowy

MSDN Magazine December 2003

Secure It: WS-Security and Remoting Channel Sinks Give Message-Level Security to Your SOAP Packets


As more organizations adopt XML-based Web Services, the need for message-level security has become evident. WS-Security, now supported in the Microsoft .NET Framework, addresses this need. Using the WS-Security framework, developers can implement channel sinks to intercept Remoting messages as they pass through the .NET Remoting infrastructure. The sink can read the message, change it, and pass it along. During this process, the message can be signed for added security. This article explains how to implement a Remoting channel sink that will modify the Remoting message by including a UserName token in the header, then sign the body using the token.

Neeraj Srivastava

MSDN Magazine November 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend