string address = string.Empty;
address = ControllerContext.HttpContext.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
// check if the request doesnt have forward remote address
if (address == null || (address != null && address.Length < 1))
{
address = HttpContext.Request.ServerVariables["REMOTE_ADDR"];
}
Wednesday, July 21, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment