Archive for the ‘C#’ Category

View A Visitor’s IP Address

Tuesday, December 16th, 2008

A very useful tool for webmasters is visitors’ IP Addresses. Once you have that information you can use it to do everything from tracking their location…to blocking unwanted guests.

The C# code looks like this:

string ipadd = Request.ServerVariables["REMOTE_ADDR"];