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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:06:12+00:00 2026-05-22T21:06:12+00:00

I have two Windows Forms applications, one acts as server (that is, Winform:Server role

  • 0

I have two Windows Forms applications, one acts as server (that is, Winform:Server role) and another one as a client (that is, Winform: Client role). In my LAN setup, there are 6 PCs and these PCs connected to each other via a 8-port switch and each PC has more than one LAN card.

There is one PC running [Winform: Server role] and five others running the [Winform: client role]. In [Winform: Server role], I’m using following code to obtain the local IP address and port number and the [Winform: Server role] will listen to all incoming TCP requests according to this auto-assigned IP address and port number.

Dim Listener As System.Net.Sockets.TcpListener
Dim Client As New System.Net.Sockets.TcpClient
Dim Message As String = ""

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Listener = New System.Net.Sockets.TcpListener(System.Net.IPAddress.Any, 0)
    Listener.Start()
End Sub

How do all [Winform: Client role] know my [Winform: Server role] IP address and port number at run time?

I need to clarify my intention. My current approach to my intention maybe incorrect. I attempt to create a ‘zero configuration client-server networking’ and that is plug & play. The server will know where the client and vise versa. I know there is a program (that is, MaxiVista) has done that exactly.

MaxiVista has two applications, that is, server and client. Users only need to execute the server application in PC designated as server role and execute the client application in another PC designated as client role. Then the server will be able to find all executing clients in the same LAN.

My intention is just that. Plug and play ‘zero configuration client-server networking’ within the same LAN.

  • 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-22T21:06:13+00:00Added an answer on May 22, 2026 at 9:06 pm

    Well, they don’t, really.

    You could configure DNS for e.g. yourappserver to point to your server and then have the clients connect to that, but that is obviously a bit complicated (plus hard-coding the value isn’t a great way to do this).

    What you could use is some sort of service announcement – e.g. via mDNS. This works by having the server periodically announce “I’m a little server, short and stout (server of WhateverYourAppIsCalled on port 12345)” and your clients to listen for such requests, or even requesting them (“is there a server of WhateverYourAppIsCalled around here?”). See also this: http://en.wikipedia.org/wiki/Zero_configuration_networking#Service_discovery

    (In a pinch, you could make the server broadcast its presence to the network and have the clients listen for such broadcasts, but then you’re basically re-implementing mDNS)

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

Sidebar

Related Questions

I have created two forms in my Windows Application. One Form acts as a
I have two Windows Forms applications and library in one solution. Library class can
I have been experimenting with sending messages from two .NET Windows Forms applications using
I have Process objects that are monitored from two different views. A Windows.Forms.ListView (actually
I am looking to have one of my Windows Forms applications be run programmatically—from
I have a windows forms application that runs two threads simultaneously, with the UI
I have two window form applications written in C, one holds a struct consisting
Scenario I have a windows forms application. I want to use two different WCF
I am using standard windows forms controls under C#. I have two controls which
I have two windows application, one is a windows service which create EventWaitHandle and

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.