Solved

Two-Way WCF?

Posted on 2008-10-30
3
872 Views
Last Modified: 2012-06-27
[VS.NET 2008]

I'm experimenting with WCF.  I have a little winforms client that's communicating with my WCF host.  I'd like to add a wrinkle, though, at least to try out.

I'd like to set up a CLR trigger that calls my WCF host.  Fine, I do believe I can do that (though I haven't tried it yet).

But when the WCF host is called by that CLR trigger, what I'd like the host to then be able to do is this:  for each client that has "registered" itself on the host (I'll make my host a singleton Windows service), the host is then able to iterate through a collection of client objects and inform each of them that a new event has arrived (via the CLR trigger).

What I need is to figure out how the host can keep a reference to each client object--so that basically, my winforms client can then *receive* events from its WCF host.

Can anyone help me with that?  I've been successfully using WCF for about 2 hours, so please don't assume much WCF knowledge on my part, at all.

Thanks very much.
0
Comment
Question by:bamapie
3 Comments
 
LVL 18

Accepted Solution

by:
DarrenD earned 300 total points
ID: 22845230
Hi,

Check out WCF Callback Interfaces

http://dotnetaddict.dotnetdevelopersjournal.com/wcf_alarmclock.htm

Cheers,

Darren
0
 
LVL 25

Assisted Solution

by:apeter
apeter earned 200 total points
ID: 22845260
Hope below links help.

Access Services with a Duplex Contract :
                    http://msdn.microsoft.com/en-us/library/ms731184.aspx
How to: Access Services with a Duplex Contract :
                    http://msdn.microsoft.com/en-us/library/ms731935.aspx
0
 

Author Comment

by:bamapie
ID: 22887129
I hope you guys don't mind my dividing the points.  The answers were 3 minutes apart and both helped greatly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Search by two fields at the same time using c# radio button 5 39
Linq Help 1 35
Why Does This Page Not Show Up? 4 24
Web Form VB.Net  import CSV 4 27
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now