Mohamed Adel Elkhodary - Microsoft Certified Professional
To get the IP address of the machine and not the proxy :
HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
If the above is null or empty use this code :
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
Happy coding :)
No comments:
Post a Comment