I would like to get the ClientIPaddress but when I call to Request.ServerVariables["HTTP_X_FORWARDED_FOR"]
I always get NULL
.
After checking the list of the Servervariables
I noticed that HTTP_X_FORWARDED_FOR
is not in the list of options.
Anyone knows how this is possible and how to solve? Or is it normal that this option is not in the list and I'm missing something.
Thanks in advance
Request.ServerVariables["HTTP_X_FORWARDED_FOR"]
will only have a value, if the request was forwarded by a proxy. Usually you will get the client IP by using Request.ServerVariables["REMOTE_ADDR"]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With