/// <summary>
/// Send the IP Address of the Client
/// </summary>
/// <returns>string</returns>
public string GetIPAddress()
{
string sIP = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (String.IsNullOrEmpty(sIP))
{
return HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
}
else
return sIP;
}
08:10 |
Category:
ASP.NET
|
0
comments
Comments (0)