title: Request.UserHostAddress return IP address of Load Balancer
body: <p>I have a critical line of code in my site that worked in our development environment but not on production.  Well, I say it worked in development but the truth is it gave <code>::1</code>, which is the IPv6 loopback address.  </p>
  
  <p>Anyway, what I wanted to do was capture the IP address of the user who came to the site.  I therefore, used <code>Request.UserHostAddress</code> to do that.  On development, as I said, it gave me the loopback address, which is correct, since I was running the site from my machine.  On live it did something entirely different.  It always returned the address of the load balancer.  </p>
  
  <p>What I am trying to understand is this.  Was I wrong to use Request.UserHostAddress to capture the user's IP address or is there something wrong with our network setup or something else?</p>
  
  <p>Thanks,</p>
  
  <p>Sachin</p>