Get IP address
-
Hi. I need to get the user's IP address (C#) of the machine they will be using to access my website. I tried:
HttpContext.Current.Request.UserHostAddress;
Request.ServerVariables("REMOTE_ADDR");
I do not think I am using it correctly. Any advice/help will be greatly appreciated. Thanks -
Hi. I need to get the user's IP address (C#) of the machine they will be using to access my website. I tried:
HttpContext.Current.Request.UserHostAddress;
Request.ServerVariables("REMOTE_ADDR");
I do not think I am using it correctly. Any advice/help will be greatly appreciated. ThanksRequest.UserHostAddress
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Hi. I need to get the user's IP address (C#) of the machine they will be using to access my website. I tried:
HttpContext.Current.Request.UserHostAddress;
Request.ServerVariables("REMOTE_ADDR");
I do not think I am using it correctly. Any advice/help will be greatly appreciated. ThanksUse Request.ServerVariables["REMOTE_ADDR"]; use square brackets instead of round brackets Bhanu