REMOTE_ADDR get's server IP and not client IP

0
0

Howdy,

Which server variable should I use, to get the client that opened the browser?
Using REMOTE_ADDR I get the server IP.

Thanks in advanced,

  • You must to post comments
0
0

It’s added by the proxy or load balancer. All server variables depends on the web server. REMOTE_ADDR and REMOTE_HOST return the client IP address. If you see the IP address of the server there is probably a redirection or proxy on your server. I just tested and it all works fine. If your server changes the headers it may be a configuration issue. Either way, Wisej.NET doesn’t change the headers.

If you still have an issue, send a link to a sample hosted application that shows all the server variables:

 private void button1_Click(object sender, System.EventArgs e)
 {
 this.dataGridView1.RowCount = 0;
 var vars = Application.ServerVariables;
 
 foreach (var name in vars.AllKeys)
 {
 this.dataGridView1.Rows.Add(name, vars[name]);
 }
 }

 

 

  • You must to post comments
0
0

Hi Julie,

there’s no HTTP_FORWARDED in IIS server variables, is it something created by wisej?

  • You must to post comments
0
0
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.