Hi Team,
I am getting an error as " HttpContext does not contain a definition for Current"
private string ClientIP() { string ipAddress = string.Empty; try { string strHostName = HttpContext.Current.Request.UserHostAddress.ToString(); ipAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString(); } catch (Exception ex) { } finally { } return ipAddress; }
Please assist me as what need to be added instead of Current ?