I need to save the host name of the requesting computer in the database if a new dataset is created. To clearly indicate this to the user (all this is an internal company), we display this as three text fields in the form that the user fills out. These three text fields are populated like this:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
txtHostname.Text = Request.UserHostName.ToString();
txtIPAdress.Text = Request.UserHostAddress.ToString();
txtWindowsLogin.Text = Request.LogonUserIdentity.Name.ToString();
}
}
However, no matter which client I tested, the reverse IP lookup, which should indicate the host name in Request.UserHostname, does not work, so the field is populated with the IP address. If I use nslookup on the server, the reverse works fine. Any hints on me where I could start? Many thanks.
user1220636
source
share