download and video for the WCF/WPF/P2P chat application


Last week I posted a description of how to write a peer-to-peer chat application using WCF, with a WPF GUI layer isolated from the application logic, all built using .NET 4.0 and Visual Studio 2010.

The basic approach was adapted from the article at http://msdn.microsoft.com/en-us/library/cc297274.aspx
where Amit Bahree and Chris Peiris did something similar, using winforms for the GUI.

 

I’ve now posted the complete source code as a .zip file here.
Just unzip, open the solution file in Visual Studio 2010, and hit F5.

 

Also, here’s a video to walk you through the whole development process.


Comments (6)

  1. jus says:

    Hi!

    Thanks for the great sample app.

    When I want to start the application, I get the following error message:

    Cannot load the X.509 certificate identity specified in the configuration.

    Can you help me?

    Thanks

    Jus

  2. sleibman says:

    Jus,

    In this example, the "App.config" file created by the WCF Service Configuration Editor tool will contain the following lines in the client endpoint definition:

    <identity>

     <certificateReference storeName="My" storeLocation="LocalMachine"

                           x509FindType="FindBySubjectDistinguishedName" />

    </identity>

    If this isn't working, the quickest fix is to avoid using anything related to X.509 certificates. The application should actually function just fine if you remove the entire set of text from <identity> through </identity> (removing those tags as well).

    You can also diagnose problems with your local X.509 certificate by running the example code found at the bottom of: msdn.microsoft.com/…/system.security.cryptography.x509certificates.x509findtype.aspx

  3. Thank you for great article says:

    Hi, Thank you for great sample, but I am looking for a way to communicate 2 particular clients directly, in other words to create private chat… is there any way with netp2p binding?

    thanks a lot

  4. Help says:

    InnerException

    {"Could not find endpoint element with name 'ChatEndpoint' and contract 'ChatBackend.IChatBackend' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element."}

  5. Arvin says:

    Can you be gracious enough to send me the source code? I'll be highly obliged. The Link you provided is not working.

    Thanks

  6. Ramakant Verma says:

    Can you please send me the code  as the link you provide is no more working. My Email Id-ramakant.verma24@gmail.com

    It will be really helpful for me