then u can use this way ,
it will display the Client proxy ip address , if the client is using Proxy server.
if (Context.Request.ServerVariables["HTTP_VIA"] != null)
{
IP = Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
}
else
{
IP = Context.Request.ServerVariables["REMOTE_ADDR"].ToString();
}
No comments:
Post a Comment