RemoteIpAddress is always null

后端 未结 3 1758
情深已故
情深已故 2020-12-17 22:15
var test1 = HttpContext.Features.Get();
var test2 = HttpContext.Connection.RemoteIpAddress;

When running the applicat

3条回答
  •  佛祖请我去吃肉
    2020-12-17 22:50

    That is because of you are trying to connect from localhost. If you have another computer in same LAN, try to connect with this pc but use user ip instead of localhost.

提交回复
热议问题