views:

201

answers:

4

I have been trying to figure this out but cannot find a reliable way to get a clients IP address when making a request to a page in asp.net that works with all servers.

+4  A: 

This question has been asked before. Check these links out:-

HTH.

(vote to close this).

Pure.Krome
+2  A: 

Request.ServerVariables("REMOTE_ADDR")

Jason
+7  A: 

One method is to use Request object:

protected void Page_Load(object sender, EventArgs e)
{
    lbl1.Text = Request.UserHostAddress;
}
TheVillageIdiot
A: 

Read this

Finding IP address behind Proxy using C# in ASP.NET