HTTP_X_FORWARDED_FOR missing from servervariables in c#
asp.net, c#, ip
Solution
`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"]`.
Problem
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