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. i am using asp.net with VB.net

i am using asp.net with VB.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadmin
4 Posts 3 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.
  • D Offline
    D Offline
    Deepthy P M
    wrote on last edited by
    #1

    I used the following code to get the Ip address Dim compname As String Dim i As Integer Dim ip1 As String() compname = System.Net.Dns.GetHostName() Dim ipentry As New IPHostEntry ipentry = Dns.GetHostEntry(compname) Dim ip As IPAddress() ip = ipentry.AddressList For i = 0 To ip.Length - 1 MsgBox(ip(i).ToString()) Next But when i host page to server it display server ip address.I want the Client ip address.If anyone know the code pls tell me

    S J 2 Replies Last reply
    0
    • D Deepthy P M

      I used the following code to get the Ip address Dim compname As String Dim i As Integer Dim ip1 As String() compname = System.Net.Dns.GetHostName() Dim ipentry As New IPHostEntry ipentry = Dns.GetHostEntry(compname) Dim ip As IPAddress() ip = ipentry.AddressList For i = 0 To ip.Length - 1 MsgBox(ip(i).ToString()) Next But when i host page to server it display server ip address.I want the Client ip address.If anyone know the code pls tell me

      S Offline
      S Offline
      Sun Rays
      wrote on last edited by
      #2

      Deepthy.P.M wrote:

      Dim compname As String Dim i As Integer Dim ip1 As String() compname = System.Net.Dns.GetHostName() Dim ipentry As New IPHostEntry ipentry = Dns.GetHostEntry(compname) Dim ip As IPAddress() ip = ipentry.AddressList For i = 0 To ip.Length - 1 MsgBox(ip(i).ToString()) Next

      Hi, this code is server side code so it wont give you IP of client. try this link[^] May be it can help you.

      Thanks, Sun Rays To get something you must have to try once. My Articles

      1 Reply Last reply
      0
      • D Deepthy P M

        I used the following code to get the Ip address Dim compname As String Dim i As Integer Dim ip1 As String() compname = System.Net.Dns.GetHostName() Dim ipentry As New IPHostEntry ipentry = Dns.GetHostEntry(compname) Dim ip As IPAddress() ip = ipentry.AddressList For i = 0 To ip.Length - 1 MsgBox(ip(i).ToString()) Next But when i host page to server it display server ip address.I want the Client ip address.If anyone know the code pls tell me

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        Deepthy.P.M wrote:

        I want the Client ip address

        Request.UserHostAddress - Gets the IP Address of the Remote Client.

        - Regards -
           J O N


        A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers


        D 1 Reply Last reply
        0
        • J John ph

          Deepthy.P.M wrote:

          I want the Client ip address

          Request.UserHostAddress - Gets the IP Address of the Remote Client.

          - Regards -
             J O N


          A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers


          D Offline
          D Offline
          Deepthy P M
          wrote on last edited by
          #4

          I think u cant understand my probem. I wrote a code but whan i hosted in server it display server dynamic ip adddress.I need client ip address after hosting to web server.If u know the code pls

          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