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 334101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:01:23+00:00 2026-05-12T10:01:23+00:00

I want to use WCF to enable two way communication without opening a port

  • 0

I want to use WCF to enable two way communication without opening a port on the client.

I’m developing something like a P2P application (similar to teamviewer/logmein) where you don’t need to open ports to communicate.

How do I accomplish two way communication through HTTP/HTTPS without the need to open a port in the client?

Note : Port 80 can be opened in the server…no issues on that.

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-05-12T10:01:24+00:00Added an answer on May 12, 2026 at 10:01 am

    Well those systems you mention work as follows. They first try to make client A and client B communicate directly via a range of different topologies which basically require one of them to allow incoming connections if that fails they fall back on a third party which acts as a man in the middle. So client A talks to the server and sends it messages for client B. Then Client A gets the messages addressed to it back in response. Client B sends it messages to the server and it’s gets the message from client A back from the server. This way both client A and B always initiate the connection and don’t need to have a port open for incoming traffic.

    If I understand correctly in your case you would always want the man in the middle. In order to do this you would have to write a WCF service that provides all relevant methods. For instance things like

    • void SendMessageToClient(Guid senderId, Guid recipientId, Message msg)
    • Message[] GetMessages(Guid recipientId)

    then have those methods respectively store and retrieve those Message objects from somewhere (like a database or a queue or something).

    Then write a client that connects to the WCF service using the HTTP binding and call the methods on the server and process the results.

    I hope you understand that

    • a) this isn’t a very efficient way to communicate.
    • b) that it’s difficult to test and debug and understand whats going on since there are so many parties involved and communication is asynchronous living in 3 different processes.
    • c) it adds an extra layer ontop of the communication so you need to keep it clear for yourself in your head (and prefereably in code) when you are dealing with the infrastructure bits and when you are dealing with the actual protocol clientA and clientB speak to each other in the Message objects.

    Pseudo (code) Example

    in this example I assume the message object is nothing more then a string and the only command is “whattimeisit” to which the response is the local time in string form

    • ClientA makes call to server.SendMessageToClient(“clientA”, “clientB”, “whattimeisit”);
    • Server stores this message in the database with ID 1
    • ClientB makes call to server GetMessages(“clientB”);
    • Server retrieves message with ID 1
    • ClientB recieves back “whattimeisit” as a response
    • ClientB makes call to server.SendMessageToClient(“clientB”, “clientA”, “19:50:12”);
    • Server stores this message in the database with ID 2
    • ClientA makes call to server GetMessages(“clientA”);
    • Server retrieves message with ID 2
    • ClientA recieves back “19:50:12” as a response
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scenario I have a windows forms application. I want to use two different WCF
I want to use wcf performance counters per operation , like here: http://msdn.microsoft.com/en-us/library/ms731052(v=vs.90).aspx how
I want to use WCF pipeline to handle requests of some custom format (not
I want to use Services(WCF/RIA /Web) to take data from Entity Data Model class
I understsand that if I want to use authentication in WCF then I need
I have a WCF web service, and I want to use Basic authentication. I
Tooday I use ServiceHost for self hosting WCF cervices. I want to host near
I want to enable SSL on WCF and what is required to be done
I have to write a web service and I want to use WCF. The
i'm trying to secure some WCF services. I'd like to use IIS or the

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.