Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ip address

ip address

Scheduled Pinned Locked Moved C#
sysadminquestioncom
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mehrdad333
    wrote on last edited by
    #1

    hi every one imagine that i am in a local network how can i retrieve my servers ip with socket programming? i know that (hostInfo.AddressList[0]) retrieve my local ip but i need my server ip like the ones that site(ip-address.com) retrieve thatks

    E M L 3 Replies Last reply
    0
    • M mehrdad333

      hi every one imagine that i am in a local network how can i retrieve my servers ip with socket programming? i know that (hostInfo.AddressList[0]) retrieve my local ip but i need my server ip like the ones that site(ip-address.com) retrieve thatks

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      run the command net view from windows as well as net group, might give you the server name. (Type net at the command line for a full list of options)

      Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      1 Reply Last reply
      0
      • M mehrdad333

        hi every one imagine that i am in a local network how can i retrieve my servers ip with socket programming? i know that (hostInfo.AddressList[0]) retrieve my local ip but i need my server ip like the ones that site(ip-address.com) retrieve thatks

        M Offline
        M Offline
        Migounette
        wrote on last edited by
        #3

        What do you mean, the one behind your adsl box for instance ?

        1 Reply Last reply
        0
        • M mehrdad333

          hi every one imagine that i am in a local network how can i retrieve my servers ip with socket programming? i know that (hostInfo.AddressList[0]) retrieve my local ip but i need my server ip like the ones that site(ip-address.com) retrieve thatks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          mehrdad333 wrote:

          how can i retrieve my servers ip

          One of two ways: keep it in a file and do a manual lookup, or make it known to a DNS server, and look it up through that. There is no way that software can guess an IP address without using some sort of lookup table that already contains the information.

          MVP 2010 - are they mad?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups