Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8030971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:56:41+00:00 2026-06-05T00:56:41+00:00

I know there are tutorials out there regarding WCF callbacks and events, but I’m

  • 0

I know there are tutorials out there regarding WCF callbacks and events, but I’m having trouble getting them to actually work, or they’re too complex. I’m a real beginner, so I would love to hear if anyone knows of any solid beginner tutorials that are aimed to what I’m trying to specifically figure out at the moment. Please forgive me if I use the wrong terminology (and please correct me), like I said I’m a beginner.

The Problem:

enter image description here

It might look more complicated than it really is. Basically what I’m trying to accomplish is:

  1. A Host with some local memory (lets say an array of 5 integers) and running a WCF service. that will listen for queries from the client AND fire an update (events?) to the client when one of these integers are changed (from an external source, such as user input via command prompt and Set()).
  2. A Client that can make direct queries to return one of these five integers or subscribe to a particular index of the host array.

What I Can Do:

I can set up the connection, but my service is limited to standalone functions. The client can make “queries”, but is limited to remote function calling (such as “add”, where all parameters are passed with the function and the processing is done internally).

What I’m Trying To Figure Out:

  1. How can I access some variables held in the host memory from the service contract functions? For example, how can I call a method from the client GetInt() that would simply return something stored in the application memory on the host?
  2. How can I push a “message” to the client from the host? For example, in the host, call TellClient(int x), which would call some function on the client side? Is this possible without running a service on both sides?

TLDR:

Host : Service <-> Client. Is there a way to push data (simply an int) to the client without the client calling any functions (no polling or queries)? Is there a way to have the WCF service access variables stored in instance of the host application without using static members? Can this be accomplished in a simple way?

Thanks for your help and time, I know I wrote a book. If anyone knows of any nice tutorials, please point me to them. But PLEASE – Don’t point me to the Add(int x, int y) example where the client just calls add on the host and returns the result – I’ve already done this a few times over and it’s not helping me grasp the real functionality of WCF. I’m really not trying to accomplish anything serious at this point, I’m really trying to keep it simple so I can learn what WCF can do, and I’m not finding the documentation to be very helpful. Thanks again everybody.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:56:42+00:00Added an answer on June 5, 2026 at 12:56 am

    Generally WCF is used in a request reply way, where clients make requests; and server replies. What you want to achieve is a “push and pull” service; or in Microsoft terms a duplex service.

    In duplex services clients just connect to a service and service registers them into some internal list. And whenever an event(or something else) arises, it sends a message to the registered clients. The key terminology for WCF in the context of your question is “duplex services”(you may google it find many results). You may refer to the following tutorials;msdn or
    codeproject

    For the second part of your question, the answer is yes. But this is not that simple. You need to write some “wcf behaviors”, for instance an IInstanceProvider may help you. For all requests, you may just create the service instance yourself, with desired parameters injected into the service instance.
    Referring to the following may help: stackoverflow or msdn.

    The question is a bit broad thus I am not 100% sure whether this is a direct answer. But at least using the keywords provided you may find the right direction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are many tutorials out there for getting started in C. However
hey, i know there's lots of tutorials out there but none seem to be
I know there are many tutorials to use Dropbox as a Git repository, but
Anyone know of any good up to date tutorials out there that show how
I know there is a lot of controversy (maybe not controversy, but arguments at
I know there has to be a way: I need help getting any hot
I know there is ongoing work for in this regards but what is the
I know there is a very similar question here but I was hoping to
I know there is a StringIO stream in Python, but is there such a
Somehow, there are really little tutorials out there for html5 video and audio playback.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.