954,168 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

is there a way to get an ip using c# and asp.net

I want to check someone's ip address when they come onto my website, is there a way that I can do that using c# and asp.net?

Dark_Omen
Posting Pro
573 posts since Apr 2004
Reputation Points: 23
Solved Threads: 6
 

Request.ServerVariables["REMOTE_ADDR"].ToString()

Iron_Cross
Junior Poster
117 posts since Jul 2003
Reputation Points: 46
Solved Threads: 2
 

One question, what is "REMOTE_ADDR" is it built in or a user defined thing?

Thanks

Dark_Omen
Posting Pro
573 posts since Apr 2004
Reputation Points: 23
Solved Threads: 6
 

It's just string. It's built in. Using that exact, word for word, example you'll get their ip.

Iron_Cross
Junior Poster
117 posts since Jul 2003
Reputation Points: 46
Solved Threads: 2
 

ok thanks for clearing that up.

Dark_Omen
Posting Pro
573 posts since Apr 2004
Reputation Points: 23
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You