I tried this below code. But it returned me ::1
string IPAddress = string.Empty;
string SearchName = string.Empty;
String strHostName = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
IPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
I expect output should be Something like : (358.89.48.188)
So I'm looking forward for anyone who could help me out.
(By getting this I will get the location and pass it to Session,So my Controller and action reacts based on the client location)