I have a website deployed on 3 different servers and these are using the load balancer. i want to get the real server IP Address not the load balancer. i am using the code:
HttpContext.Current.Request.ServerVariables("LOCAL_ADDR")
I have a website deployed on 3 different servers and these are using the load balancer. i want to get the real server IP Address not the load balancer. i am using the code:
HttpContext.Current.Request.ServerVariables("LOCAL_ADDR")
You may try :
System.Net.IPAddress[] adds =
System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName());