#region
#region
public static string getUserIp()
{
return HttpContext . Current . Request . UserHostAddress;
}
/// <summary>
///
/// </summary>
/// <param name="page"> </param>
/// <returns> </returns>
public static string GetClientIP(System . Web . UI . Page page)
{
string ipAddress = "" ;
if (HttpContext . Current . Request . ServerVariables[ "HTTP_X_FORWARDED_FOR" ] == null )
{
ipAddress = HttpContext . Current . Request . ServerVariables[ "Remote_Addr" ];
}
else
{
ipAddress = HttpContext . Current . Request . ServerVariables[ "HTTP_X_FORWARDED_FOR" ];
}
return ipAddress;
}
#endregion
#region
public static string getUserHostName()
{
return HttpContext . Current . Server . MachineName . ToString();
}
#endregion
#endregion