4

In Asp.Net MVC we have below

Request.ServerVariables.AllKeys
Request.ServerVariables.GetValues("REMOTE_ADDR")[0]
Request.ServerVariables.GetValues("HTTP_SCGID")[0]
Request.ServerVariables.GetValues("HTTP_SCMAIL")[0]

I am looking for equivalent in Asp.Net Core Razor Pages.

reddy
  • 143
  • 1
  • 3
  • 9
  • 3
    Possible duplicate of [How to access ServerVariables in AspnetCore 1.0](https://stackoverflow.com/questions/38429604/how-to-access-servervariables-in-aspnetcore-1-0) – FaizanHussainRabbani Feb 21 '18 at 12:54
  • @FaizanRabbani that link didn't help me much. – reddy Feb 21 '18 at 13:16
  • This may be of use with regards to REMOTE_ADDR, although the post is a bit old now: [DIRECT replacement of UserHostAddress in ASP.NET Core?](https://stackoverflow.com/questions/35794237/direct-replacement-of-userhostaddress-in-asp-net-core) – SpruceMoose Feb 21 '18 at 14:05

0 Answers0