Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting IP address of visitor?

Reply
Thread Tools

Getting IP address of visitor?

 
 
brett
Guest
Posts: n/a
 
      11-07-2006
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

 
Reply With Quote
 
 
 
 
JosephByrns
Guest
Posts: n/a
 
      11-07-2006
Request.UserHostAddress

"brett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?TW9oYW1lZCBNb3NhbGVt?=
Guest
Posts: n/a
 
      11-07-2006
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
>
>

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-07-2006
"brett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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...


 
Reply With Quote
 
mark@markrae.co.uk
Guest
Posts: n/a
 
      11-07-2006
Mark Rae wrote:

> It is the simplest thing in the world to spoof an IP address...


Like this.

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-07-2006
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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...


 
Reply With Quote
 
brett
Guest
Posts: n/a
 
      11-07-2006
> 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

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-07-2006
"brett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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...?


 
Reply With Quote
 
kpg
Guest
Posts: n/a
 
      11-07-2006
As Mark Rae once said in microsoft.public.dotnet.framework.aspnet

> "brett" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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...
 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-07-2006
"kpg" <(E-Mail Removed)> wrote in message
news:Xns98749EEEF36CFipostthereforeiam@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...


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN with DMZ IP address NETed to LAN IP address!!! route-map!!! examples20001@gmail.com Cisco 0 02-07-2006 04:05 PM
PIX Firewall MAC address VPN IP address Julian Dragut Cisco 1 02-07-2006 07:57 AM
obtaining the IP ADDRESS of an IP POHNE by its MAC ADDRESS ProgDario Cisco 17 05-06-2005 02:32 PM
Routing to public IP of NAT address from internal NAT address Andrew Albert Cisco 1 02-08-2005 07:05 PM
Re: Hide Address Bar or Encrypt Address?? avnrao ASP .Net 1 05-04-2004 03:46 PM



Advertisments