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. Web Development
  3. ASP.NET
  4. Show Computer name and IP of the computer viewing the web page

Show Computer name and IP of the computer viewing the web page

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpquestion
5 Posts 2 Posters 1 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.
  • S Offline
    S Offline
    SAadmin
    wrote on last edited by
    #1

    Hi ALL I like to Show Computer name and IP and host name of the computer viewing the intranet web page on the page. I am using aspx page with vb code behind. I can only see the server`s hostname, ip address and hostname. not the current pc`s :confused: Can someone help me PLEASE and can it be done?

    G 1 Reply Last reply
    0
    • S SAadmin

      Hi ALL I like to Show Computer name and IP and host name of the computer viewing the intranet web page on the page. I am using aspx page with vb code behind. I can only see the server`s hostname, ip address and hostname. not the current pc`s :confused: Can someone help me PLEASE and can it be done?

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      You get the user IP address from Request.UserHostAddress. As long as the compuer is in the same local network as the server, you can get the computer name using System.Net.Dns.GetHostEntry(ip).HostName.

      Despite everything, the person most likely to be fooling you next is yourself.

      S 1 Reply Last reply
      0
      • G Guffa

        You get the user IP address from Request.UserHostAddress. As long as the compuer is in the same local network as the server, you can get the computer name using System.Net.Dns.GetHostEntry(ip).HostName.

        Despite everything, the person most likely to be fooling you next is yourself.

        S Offline
        S Offline
        SAadmin
        wrote on last edited by
        #3

        I tried that and it keep on giving me the server`s ip and host name. Is it maybe a permission setting? I have changed “authentication methods “to “integrated Windows authentication”. Still not working. I have also tried. :(( - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck

        G 1 Reply Last reply
        0
        • S SAadmin

          I tried that and it keep on giving me the server`s ip and host name. Is it maybe a permission setting? I have changed “authentication methods “to “integrated Windows authentication”. Still not working. I have also tried. :(( - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          SAadmin wrote:

          I have also tried. Cry - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck

          No wonder. All those get the name of the server. What I showed you gets the ip address from the http header. If that would not be the ip of the client, the server would not be able to send the response back to the client.

          Despite everything, the person most likely to be fooling you next is yourself.

          S 1 Reply Last reply
          0
          • G Guffa

            SAadmin wrote:

            I have also tried. Cry - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck

            No wonder. All those get the name of the server. What I showed you gets the ip address from the http header. If that would not be the ip of the client, the server would not be able to send the response back to the client.

            Despite everything, the person most likely to be fooling you next is yourself.

            S Offline
            S Offline
            SAadmin
            wrote on last edited by
            #5

            Tanx !!!!! IT WORKS :) :-D :) :-D All I need nou is to show the OS and Service packs of the Computers

            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