ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I get an IP address

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#)
View previous topic :: View next topic  
Author Message
raven



Joined: 31 Jan 2006
Posts: 41

PostPosted: Tue Jan 31, 2006 5:48 pm    Post subject: How do I get an IP address Reply with quote

I know this comes across as a very basic question but:

How can I pull the visiting IP address under ASP.NET?
_________________
Programmers do it in code
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Thu Feb 02, 2006 1:24 pm    Post subject: Reply with quote

Here is how:

Request.ServerVariables( "REMOTE_ADDR" )



Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
Stigs



Joined: 03 Feb 2006
Posts: 9

PostPosted: Fri Feb 03, 2006 5:40 am    Post subject: Reply with quote

paul wrote:
Here is how:

Request.ServerVariables( "REMOTE_ADDR" )



Paul


Thanks paul for your tips i got it my ip adderess. Smile
Back to top
View user's profile Send private message
raven



Joined: 31 Jan 2006
Posts: 41

PostPosted: Wed Feb 22, 2006 1:13 pm    Post subject: Reply with quote

paul wrote:
Here is how:

Request.ServerVariables( "REMOTE_ADDR" )



Paul


Paul,

Thank you very much for your response. Do you know how to get other information as well? Such as browser type, display size etc?
_________________
Programmers do it in code
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Wed Feb 22, 2006 2:08 pm    Post subject: Reply with quote

raven wrote:
paul wrote:
Here is how:

Request.ServerVariables( "REMOTE_ADDR" )



Paul


Paul,

Thank you very much for your response. Do you know how to get other information as well? Such as browser type, display size etc?


You can get the browser, but not the display size Smile

Request.ServerVariables("HTTP_USER_AGENT") - this will get you the browser

Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") - this will give you the default language for the operating system




Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
raven



Joined: 31 Jan 2006
Posts: 41

PostPosted: Thu Feb 23, 2006 1:50 pm    Post subject: Reply with quote

Thank you for your assistance Paul. You are such a big help and such a good asset to these forums.
_________________
Programmers do it in code
Back to top
View user's profile Send private message
marbles



Joined: 01 Mar 2006
Posts: 16

PostPosted: Mon Apr 03, 2006 1:44 am    Post subject: Reply with quote

I've been wanting to do this myself. Thanks Paul.

This is good info to have no your own statistics pages, you can really keep track of who came to the site.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial