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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:07:03+00:00 2026-05-28T04:07:03+00:00

I am using socket programming in vb.net to create a server client remoting application.

  • 0

I am using socket programming in vb.net to create a server client remoting application. The problem occurs when I use both the client and server in a win 7 box. It works fine for win xp or cross-platform communication (e.g. win xp to win 7).
Below are the codes used at the client and server end:

Client:

Dim ips As IPAddress() 

ips = Dns.GetHostAddresses(HostName)

For index = 0 To ips.Length - 1         

Next index

===========================================================

private sub sendFile(byval ip as string)

Dim client As TcpClient = Nothing client = New TcpClient(ips(index).ToString, 8000) 

    'Code to send file

End sub

Server:

Dim Listener As TcpListener = Nothing
Listener = New TcpListener(IPAddress.Any, 8000)
Listener.Start()

 Dim client As TcpClient = Nothing
        Dim netstream As NetworkStream = Nothing

                If Listener.Pending() Then
                client = Listener.AcceptTcpClient()
                netstream = client.GetStream()

When running both client and server on win 7 the error below is thrown:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Please help me to figure out what the problem is. Is it the level of permissions that win 7 has?

  • 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-28T04:07:03+00:00Added an answer on May 28, 2026 at 4:07 am

    Below is the issue and the solution for it:

    1. Issue:

      Win 7 comes with ip v6. So whenever we are using Dns.GetHostAddresses(hostname), it returns all ip addresses associated to the host (both ip v4 & ip v6). Using this ip v6 address with functions for ip v4 compatibility created problem.

    2. Solutions:

      Whenever using Dns.GetHostAddresses(hostname), check for ip v4.

      if (ObjTemp.AddressFamily.ToString() == ProtocolFamily.InterNetwork.ToString())
      

    Hope this would help others working on socket programming. 🙂

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

Sidebar

Related Questions

I have implemented the client server using socket programming in C on Unix OS.
I'm writing a proxy using .NET and C#. I haven't done much Socket programming,
I am currently doing some socket programming using C/C++. To be able to use
I am still learning socket programming (using Perl) but I have both options (
I am writing a client-server application using TCP Sockets. The server is written in
Using socket programming some time it gives error that port is already in use
Is there anyone who knows how to get client IP address using socket programming
I've created a project using socket programming. If I connect a single client to
I'm building an application in which I am using Socket Programming in Java using
I am trying to conceptually work through a model for a client-server socket application

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.