473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Getting user IP Address

I have been using the following to get the client IP address:

Request.ServerVariables["REMOTE_ADDR"]

All of a sudden it has started returning

127.0.0.1 all the time. Does anybody have any idea why this would happen?

Any help is greatly appreciated.
Nov 19 '05 #1
5 2322
Are you running this site locally
http://localhost ??

"Greg Smith" wrote:
I have been using the following to get the client IP address:

Request.ServerVariables["REMOTE_ADDR"]

All of a sudden it has started returning

127.0.0.1 all the time. Does anybody have any idea why this would happen?

Any help is greatly appreciated.

Nov 19 '05 #2
Yes.
"Tampa .NET Koder" <Ta***********@discussions.microsoft.com> wrote in
message news:D0**********************************@microsof t.com...
Are you running this site locally
http://localhost ??

"Greg Smith" wrote:
I have been using the following to get the client IP address:

Request.ServerVariables["REMOTE_ADDR"]

All of a sudden it has started returning

127.0.0.1 all the time. Does anybody have any idea why this would
happen?

Any help is greatly appreciated.

Nov 19 '05 #3

"Greg Smith" <gj*@umn.edu> wrote in message
news:u8**************@TK2MSFTNGP14.phx.gbl...
I have been using the following to get the client IP address:

Request.ServerVariables["REMOTE_ADDR"]

All of a sudden it has started returning

127.0.0.1 all the time. Does anybody have any idea why this would happen?

Any help is greatly appreciated.

I use request.userhostaddress to get the ip address of the user.
Nov 19 '05 #4
If you are accessing the site from your own machine..I think this is the
address you should be getting. But, if you access this site from a remote
workstation, then you should see that remote workstation address. Other
than that, I don't have a clue what is wrong..I will defer this to someone
else

"Greg Smith" wrote:
I have been using the following to get the client IP address:

Request.ServerVariables["REMOTE_ADDR"]

All of a sudden it has started returning

127.0.0.1 all the time. Does anybody have any idea why this would happen?

Any help is greatly appreciated.

Nov 19 '05 #5
REMOTE_ADDR is the IP address of the user visiting the site.

If you are on the same machine as the site, and visit it via
http://localhost/blahblah, then your IP is locahost == 127.0.0.1.

In order to see something different from REMOTE_ADDR, you need to access the
site from a different machine.

--
Ben Strackany
www.developmentnow.com
"Greg Smith" <gj*@umn.edu> wrote in message
news:u4**************@TK2MSFTNGP14.phx.gbl...
Yes.
"Tampa .NET Koder" <Ta***********@discussions.microsoft.com> wrote in
message news:D0**********************************@microsof t.com...
Are you running this site locally
http://localhost ??

"Greg Smith" wrote:
I have been using the following to get the client IP address:

Request.ServerVariables["REMOTE_ADDR"]

All of a sudden it has started returning

127.0.0.1 all the time. Does anybody have any idea why this would
happen?

Any help is greatly appreciated.


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dinçer | last post by:
Hi, I am trying to get user data (email data actually) from Active Directory. What I exactly want to do is, getting the email address according to username from the domain. For example, when I...
3
by: Mr. Smith | last post by:
Hi All. I need to be able to determine the IP address a drive letter is mapped to. When a user selects a file from a file open dialog, They will, as usual, navigate to the file they want via;...
3
by: Dinçer | last post by:
Hi, I am trying to get user data (email data actually) from Active Directory. What I exactly want to do is, getting the email address according to username from the domain. For example, when I...
6
by: Prabhat | last post by:
Hi Friends, It it possible to get the MAC Address of the client PC using ASP. Also can I get the HDD ID/Serial Number also using asp? Please advice. Thanks Prabhat
0
kaleeswaran
by: kaleeswaran | last post by:
hi! currently i am doing registration form... i like to getting an ip address from the respective system i mean where the user using my application form, the respective system ip address...
5
by: Michael Howes | last post by:
I'm writing a utility to manage a machines *local* accounts in c# I am getting all the users in a specific Group just fine but when I want to get some of the information on each user from their...
4
by: jeet | last post by:
Plz help me.Problem is that On the first page I display all other user with checkbox and give user option to select only two user which he wants to send message. Tell me please how I'll get those...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
7
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.