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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:51:26+00:00 2026-05-22T00:51:26+00:00

EDIT I accidentaly found a walk around to this problem… Adding the following line

  • 0

EDIT I accidentaly found a walk around to this problem… Adding the following line in the begining of the function solved the problem for some reason…

remoteIPAdress = remoteIPAdress & "END"

Hello.
I have a school assignment where I am supposed to build a simple TCP/IP messenger in Visual Basic…
The problem is that when the client sends his IP in a request I’ve built (“LetMeIn\XXX.XXX.XXX.XXX”), even if the server receives the request as it should, it parses it completely wrong…

To be more exact, when I run this snippet I get these results:

Private Function findFreeIPEndPoint(ByVal remoteIPAdress As String) As IPEndPoint
    Dim ipEndPoint As IPEndPoint

    System.Diagnostics.Debug.Write("LOL! The IP adress you try to parse is " & remoteIPAdress)
    System.Diagnostics.Debug.WriteLine("The parsed result is " & String.Concat(IPAddress.Parse(remoteIPAdress)))
    ipEndPoint = New IPEndPoint(IPAddress.Parse(remoteIPAdress), 1003 + topUniqueId)
    MessageBox.Show(String.Concat(ipEndPoint.Address))
    System.Diagnostics.Debug.Write("The IP adress you got is " & String.Concat(ipEndPoint.Address))

    Try
        listener(ipEndPoint.Port - 1003).Start()
    Catch ex As Exception

    End Try

    topUniqueId = topUniqueId + 1

    Return ipEndPoint
End Function

Output:

LOL! The IP adress you try to parse is 192.168.1.65

A first chance exception of type ‘System.FormatException’ occurred in System.dll

If i change the following line

ipEndPoint = New IPEndPoint(IPAddress.Parse(remoteIPAdress), 1003 + topUniqueId)

to

ipEndPoint = New IPEndPoint("192.168.1.65", 1003 + topUniqueId)

I get this:

The IP adress you got is 229.64.116.11

Weird right?

  • 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-22T00:51:26+00:00Added an answer on May 22, 2026 at 12:51 am

    Edit:

    With the edited question, my guess is that the input is not "192.168.1.65“, but actually contains padding. Perhaps as simple as "192.168.1.65 ". Check the string carefully. Heck, check the .Length first, then character by character.


    Original answer based on the original question

    I don’t believe the output you are displaying is true, in part because of the missing LOL! But also, you have one of the numbers hard-coded; surely it should be:

     ipEndPoint = New IPEndPoint(IPAddress.Parse(remoteIPAdress),1003 + topUniqueId)
    

    Also keep in mind the differnce between a local IP and a public IP. A 192.168 IP is your LAN. Remote clients won’t have that, but will be using a public IP address translated via their router/proxy/whatever.

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

Sidebar

Related Questions

Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
Edit: I have solved this by myself. See my answer below I have set
Edit: This question was written in 2008, which was like 3 internet ages ago.
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: This question is more about language engineering than C++ itself. I used C++
Edit : Solved, there was a trigger with a loop on the table (read
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know
EDIT: upgraded this question to MVC 2.0 With asp.net MVC 2.0 is there an
Edit: This is technically a 2 part question. I've chosen the best answer that
(EDIT: I've edited my question to make it simpler, sorry if some answers are

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.