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

  • SEARCH
  • Home
  • 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 9000771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:21:06+00:00 2026-06-16T00:21:06+00:00

i am beginner for WCF. so i was reading a code online for small

  • 0

i am beginner for WCF. so i was reading a code online for small wcf chat.i got stuck to create wcf client for that wcf chat. the url from where i was reading http://islameldemery.blogspot.in/2008/05/wcf-serverclient-chat-sample.html

there is one part for interface and service is hosted in win form with the help of ServiceHost but i am not being able to understand how proxy was created at client end.

they use this event below

InnerDuplexChannel.Opened
InnerDuplexChannel.Closed
InnerDuplexChannel.Faulted 

which i really do not understand. can anyone tell me how the client was created. please visit the url and please tell me how that person create a proxy at client side for that chat service.

i tried to create a proxy dynamically like self hosted as

var myBinding = new NetTcpBinding(SecurityMode.None);
  DuplexChannelFactory<ISampleChatCallback> cf =
          new DuplexChannelFactory<ISampleChatCallback>(
              new CallbackImpl(),
              myBinding,
              new EndpointAddress("net.tcp://192.168.1.2:8080/DataService")); 
  IServerWithCallback srv = cf.CreateChannel();

but srv has no event called Opened,Closed or faulted etc. i really need to understand how proxy was created at cleint end. please help me to create proxy as a result i can complete the code for client side. thanks

  • 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-16T00:21:07+00:00Added an answer on June 16, 2026 at 12:21 am

    Have a look at the private void buttonConnect_Click(object sender, EventArgs e)

    if (CheckServer()) //this seems to get metadata (MEX) from server
    {
        proxy = null;
        InstanceContext context = new InstanceContext(this);
    
        // Step into this method and see what code gets executed.
        // This code can be generated by Visual Studio or written manually
        proxy = new Client.SampleService.SampleChatClient(context);
    
        proxy.InnerDuplexChannel.Opened += new EventHandler(InnerDuplexChannel_Opened);
        ...
    }
    

    The proxy exposes some events that (I suppose) are just wrappers of the WCF duplex channel communication class (whatever it is). Those events get fired when a new connection is opened, closed or appears in a faulted state.

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

Sidebar

Related Questions

I'm new to WCF I have to create a WCF service that receives plain
I am beginner for WCF technology. So I create a simple wcf service hello
Beginner question: I want to debug some code that compiles. I pressed debug, it
I would like to add callbacks to my WCF service, so that my client
I have a win forms client that accesses a wcf service for a long
Is there any Absolute Beginner's tutorial available on Web for WCF that comprehensively describes
Beginner in JS :) needs an explanation of code piece from Crockford's book ,
Beginner in Android development. My code crashes. I have made a simple Java method
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
Question : Beginner Level Code: Pure Javascript I had created a web page in

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.