How to get the server IP Address (in C# / asp.net)?

asp.net, c#

Solution

Request.ServerVariables["LOCAL_ADDR"];

From the docs:

Returns the server address on which the request came in. This is important on computers where there can be multiple IP addresses bound to the computer, and you want to find out which address the request used.

This is distinct from the Remote addresses which relate to the client machine.

Problem

Is there a 1 line method to get the IP Address of the server? Thanks

Original source

Related problems