I'm trying to get the data that was in Request.ServerVariables["REMOTE_ADDR"] in an API controller in ASP.Net Web Api. But the servervariables dictionary is gone. Is that property/data still available?
Asked
Active
Viewed 2,187 times
1 Answers
2
Request.ServerVariables
is there or not on the hosting medium that you have. Simply use Request.Properties["MS_HttpContext"].Request.ServerVariables["REMOTE_ADDR"]
to get what you need.

Teoman Soygul
- 25,584
- 6
- 69
- 80