C# Class System.Web.Mvc.Html.NetworkHelper

Show file Open project: drorgl/MSDNSWebAdmin

Public Methods

Method Description
ClientIPAddress ( System.Web.HttpContextBase context ) : string

Retrieves the Client IP or IPs if the proxy messed things up Taken from http://stackoverflow.com/questions/2577496/how-can-i-get-the-clients-ip-address-in-asp-net-mvc

GetFirstIp ( string computerName ) : string
GetReverseDNS ( string ip, int timeout ) : string

Reverse DNS Lookup

Method Details

ClientIPAddress() public static method

Retrieves the Client IP or IPs if the proxy messed things up Taken from http://stackoverflow.com/questions/2577496/how-can-i-get-the-clients-ip-address-in-asp-net-mvc
public static ClientIPAddress ( System.Web.HttpContextBase context ) : string
context System.Web.HttpContextBase HttpContext.Current
return string

GetFirstIp() public static method

public static GetFirstIp ( string computerName ) : string
computerName string
return string

GetReverseDNS() public static method

Reverse DNS Lookup
public static GetReverseDNS ( string ip, int timeout ) : string
ip string ip address
timeout int timeout in milliseconds
return string