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. Getting a users IP address

Getting a users IP address

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 2 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.
  • W Offline
    W Offline
    windhopper
    wrote on last edited by
    #1

    Does anyone have any clue of the code used to get a user's IP address? At the moment i'm using

    HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

    but i'm having trouble implementing it and am not sure if it's the right method to use :~ Thanks

    "Sex is not the answer, it's the question and the answer is yes"

    S 1 Reply Last reply
    0
    • W windhopper

      Does anyone have any clue of the code used to get a user's IP address? At the moment i'm using

      HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

      but i'm having trouble implementing it and am not sure if it's the right method to use :~ Thanks

      "Sex is not the answer, it's the question and the answer is yes"

      S Offline
      S Offline
      Sherin Iranimose
      wrote on last edited by
      #2

      How about... Request.UserHostAddress()

      EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE. How to post a question

      W 1 Reply Last reply
      0
      • S Sherin Iranimose

        How about... Request.UserHostAddress()

        EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE. How to post a question

        W Offline
        W Offline
        windhopper
        wrote on last edited by
        #3

        Thanks Sherin, can't believe i missed that one.

        "Sex is not the answer, it's the question and the answer is yes"

        S 1 Reply Last reply
        0
        • W windhopper

          Thanks Sherin, can't believe i missed that one.

          "Sex is not the answer, it's the question and the answer is yes"

          S Offline
          S Offline
          Sherin Iranimose
          wrote on last edited by
          #4

          :)

          EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE. How to post a question

          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