[Docs] More detail for `Microsoft.AspNetCore.Http.ConnectionInfo.RemoteIpAddress`
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
One uses HttpContext.Connection.RemoteIpAddress
to get a client’s IP address.
Microsoft.AspNetCore.Http.ConnectionInfo.RemoteIpAddress
is marked as nullable.
The docs linked above just say “Can be null” - under what conditions can it be null?
Describe the solution you’d like
The docs for Microsoft.AspNetCore.Http.ConnectionInfo.RemoteIpAddress
are unclear. Please add more detail.
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
ConnectionInfo.RemoteIpAddress Property
Gets or sets the IP address of the remote target. Can be null.
Read more >IHttpConnectionFeature.RemoteIpAddress Property
Gets or sets the IPAddress of the client making the request. Note this may be for a proxy rather than the end user....
Read more >ConnectionInfo Class (Microsoft.AspNetCore.Http)
Represents the underlying connection for a request. ... In this article ... Http. Assembly: Microsoft.AspNetCore.Http.Abstractions.dll. Package: Microsoft.
Read more >HttpConnectionFeature.RemoteIpAddress Property
Gets or sets the IPAddress of the client making the request. Note this may be for a proxy rather than the end user....
Read more >Configure ASP.NET Core to work with proxy servers and ...
Learn about configuration for apps hosted behind proxy servers and load balancers, which often obscure important request information.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When Kestrel is behind a reverse proxy then RemoteIpAddress will report the address of the proxy rather than null. I think the SO issue with IIS returning was null for a preview where this hadn’t been fully implemented yet.
If the connection isn’t a tcp connection. It could be a Unix domain socket or a transport that isn’t up based