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
2009-05-15 04:36:18
+7
A:
One method is to use Request object:
protected void Page_Load(object sender, EventArgs e)
{
lbl1.Text = Request.UserHostAddress;
}
TheVillageIdiot
2009-05-15 04:37:50