473,379 Members | 1,533 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,379 software developers and data experts.

Getting IP address of visitor?

How can I get the IP address of a visitor to my site in ASP.NET 2.0?
Please include the full namespace.

Thanks,
Brett

Nov 7 '06 #1
9 4104
Request.UserHostAddress

"brett" <ac*****@cygen.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
How can I get the IP address of a visitor to my site in ASP.NET 2.0?
Please include the full namespace.

Thanks,
Brett

Nov 7 '06 #2
Hi,
string ip=HttpContext.Current.Request.UserHostAddress;

Regards,
Mohamed Mosalem

"brett" wrote:
How can I get the IP address of a visitor to my site in ASP.NET 2.0?
Please include the full namespace.

Thanks,
Brett

Nov 7 '06 #3
"brett" <ac*****@cygen.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
How can I get the IP address of a visitor to my site in ASP.NET 2.0?
Please include the full namespace.
In addition to the replies you've already received, you simply cannot place
any trust whatsoever that the IP address being reported is genuine.

It is the simplest thing in the world to spoof an IP address...
Nov 7 '06 #4
Mark Rae wrote:
It is the simplest thing in the world to spoof an IP address...
Like this.

Nov 7 '06 #5
<ma**@markrae.co.ukwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
>It is the simplest thing in the world to spoof an IP address...

Like this.
A quick inspection of the message properties of this post and the before the
previous one will tell you that they are from an IP address in London.

But the one in the middle looks as if it's come from Wilmington, Delaware...

I assure you it hasn't...

This really is so easy to do that capturing the IP address of incomg
requests to a website is almost not worth the bother...
Nov 7 '06 #6
This really is so easy to do that capturing the IP address of incomg
requests to a website is almost not worth the bother...
Well, I'm just trying to keep some javascript tracking code from
tracking my IP, which I won't be spoofing. I'm guessing it should work
fine in that case. The IP doesn't change.

Thanks,
Brett

Nov 7 '06 #7
"brett" <ac*****@cygen.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Well, I'm just trying to keep some javascript tracking code from
tracking my IP, which I won't be spoofing. I'm guessing it should work
fine in that case. The IP doesn't change.
Er, so now you're looking for a way to *prevent* your IP address from being
tracked by JavaScript code...?
Nov 7 '06 #8
kpg
As Mark Rae once said in microsoft.public.dotnet.framework.aspnet
"brett" <ac*****@cygen.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>Well, I'm just trying to keep some javascript tracking code from
tracking my IP, which I won't be spoofing. I'm guessing it should
work fine in that case. The IP doesn't change.

Er, so now you're looking for a way to *prevent* your IP address from
being tracked by JavaScript code...?
Sounds like he doesn't want *his* visits tracked, just *real* visitors.

Or is could be more insidious... :)
Nov 7 '06 #9
"kpg" <no@way.comwrote in message
news:Xn*******************************@207.46.248. 16...
>>Well, I'm just trying to keep some javascript tracking code from
tracking my IP, which I won't be spoofing. I'm guessing it should
work fine in that case. The IP doesn't change.

Er, so now you're looking for a way to *prevent* your IP address from
being tracked by JavaScript code...?

Sounds like he doesn't want *his* visits tracked, just *real* visitors.
Oh right - yes, I see what you mean now...

In which case, it's dead easy, as the first two replies have described...
Or is could be more insidious... :)
Let's give him the benefit of the doubt... :-)
Nov 7 '06 #10

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

Similar topics

5
by: truckmen | last post by:
Hello All, I still can't figure it all out. I am trying to create a web page (using php) where: 1) A visitor add his or her name to an address book that can also be viewed online by other...
14
by: pcchong | last post by:
I use a free database-driven ASP guestbook. I want to add a IP address blocking filter to it( just to block one particular guest). What is the easiest way to do so? Thanks. pcchong
4
by: Al Sashun | last post by:
Hi There, I'm not sure if this is the right place, but I'm after a script or program that will provide me with site visitors email address's, the only reason being my clients would like to see who...
1
by: flyguyes | last post by:
HI all Im new to this so forgive my ignorance. so here goes my question I've been researching for a while but havent found what i need. What Im need is a javascript that will make a form box that...
4
by: Arun | last post by:
Like its possible to find IP address of a visitor in same way is it possible to find the visitor's PC's MAC address? -Regards,
12
by: FluffyCat | last post by:
New on November 28, 2005 for www.FluffyCat.com PHP 5 Design Pattern Examples - the Visitor Pattern. In the Visitor pattern, one class calls a function in another class and passes an instance of...
3
by: Lad | last post by:
I would like to record visitor's IP address.How can I do that in Python? Thanks for help L
3
by: bush | last post by:
hi everyone! i want to get the ipaddress,and the country name of a webpage visitor,using asp.Net(C#).if anyone knows about it,plz rply me. thanx in advance.
3
by: =?Utf-8?B?TWFyaw==?= | last post by:
I have an ASP.Net 1.1 site that uses Server.Transfer() heavily. Specifically, I use a page called /misc/pagenotfound.aspx to implement logic that maps URLs of the format /vdir/california to a...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.