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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:36:26+00:00 2026-05-11T12:36:26+00:00

We have Request.UserHostAddress to get the IP address in ASP.NET, but this is usually

  • 0

We have Request.UserHostAddress to get the IP address in ASP.NET, but this is usually the user’s ISP’s IP address, not exactly the user’s machine IP address who for example clicked a link. How can I get the real IP Address?

For example, in a Stack Overflow user profile it is: ‘Last account activity: 4 hours ago from 86.123.127.8’, but my machine IP address is a bit different. How does Stack Overflow get this address?

In some web systems there is an IP address check for some purposes. For example, with a certain IP address, for every 24 hours can the user just have only 5 clicks on download links? This IP address should be unique, not for an ISP that has a huge range of clients or Internet users.

Did I understand well?

  • 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. 2026-05-11T12:36:27+00:00Added an answer on May 11, 2026 at 12:36 pm

    As others have said you can’t do what you are asking. If you describe the problem you are trying to solve maybe someone can help?

    E.g.

    • are you trying to uniquely identify your users?
    • Could you use a cookie, or the session ID perhaps instead of the IP address?

    Edit The address you see on the server shouldn’t be the ISP’s address, as you say that would be a huge range. The address for a home user on broadband will be the address at their router, so every device inside the house will appear on the outside to be the same, but the router uses NAT to ensure that traffic is routed to each device correctly. For users accessing from an office environment the address may well be the same for all users. Sites that use IP address for ID run the risk of getting it very wrong – the examples you give are good ones and they often fail. For example my office is in the UK, the breakout point (where I ‘appear’ to be on the internet) is in another country where our main IT facility is, so from my office my IP address appears to be not in the UK. For this reason I can’t access UK only web content, such as the BBC iPlayer). At any given time there would be hundreds, or even thousands, of people at my company who appear to be accessing the web from the same IP address.

    When you are writing server code you can never be sure what the IP address you see is referring to. Some users like it this way. Some people deliberately use a proxy or VPN to further confound you.

    When you say your machine address is different to the IP address shown on StackOverflow, how are you finding out your machine address? If you are just looking locally using ipconfig or something like that I would expect it to be different for the reasons I outlined above. If you want to double check what the outside world thinks have a look at whatismyipaddress.com/.

    This Wikipedia link on NAT will provide you some background on this.

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

Sidebar

Related Questions

I have some code in an asp.net app that needsto get the ipv4 address
I have request SELECT IF(f.date_term=3,t.quarter*f.date_term ,''), IF(f.date_term=6,t.halfyear*f.date_term,''), IF(f.date_term=12,t.year*f.date_term,'') but this is not work. how
I have linq request. I need get item.Title in select. how do this? var
When a user request comes in, I can use Context.Request.UserHostAddress to get the user's
I get this error with reCaptcha: 'Input error: response: Required field must not be
When I inspect Request.UserHostAddress or Request.UserHostName in my controller method, they both have value
I have a problem when I use HttpContext.Current.Request.UserHostAddress , some times returns 192.168.0.17 (IPv4)
Both have Request and Response properties, but I can't write a method that takes
Disclaimer : I have seen the exact questions, but have not seen any answers
I have a request that takes about 1.5 minutes to complete, but when it

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.