var test1 = HttpContext.Features.Get<IHttpConnectionFeature>(); var test2 = HttpContext.Connection.RemoteIpAddress;
When running the application locally on IISExpress, these two lines correctly return the value 0:0:1 .
When I publish an application on IIS 7.5 (which runs on a virtual machine). RemoteIpAddress always null
I am using ASP.Net 5 RC 1.
How can I get client IP address in ASP.NET 5 application?
I tried the solutions in the following questions, however I have the problem mentioned above:
Ali Sharabiani Feb 16 '16 at 19:34 2016-02-16 19:34
source share