I have a bit of a problem. I am trying to get hold the PC hostname for an intranet questionnaire application I am writing.
Basically I need to ensure that the user can only submit the form once. I was planning to capture the users computer name and store that against the record. The user does not log in to the web form in any way, just request the URL from the web server.
However every thing I do just returns the hostname of the Web Server- not the client. I am totally stuck!!
I have tried all the following :-
Environment.MachineName;
System.Net.Dns.GetHostName();
System.Environment.GetEnvironmentVariable("COMPUTE RNAME");
HttpContext.Current.Request.UserHostName;
System.Net.Dns.GetHostEntry(Request.ServerVariable s["remote_addr"]).HostName.ToString();
Has any one got any suggestion?
The head of HR is hounding me to complete this, hence the reason why I am looking at it on a sunday afternoon!
Basically I need to ensure that the user can only submit the form once. I was planning to capture the users computer name and store that against the record. The user does not log in to the web form in any way, just request the URL from the web server.
However every thing I do just returns the hostname of the Web Server- not the client. I am totally stuck!!
I have tried all the following :-
Environment.MachineName;
System.Net.Dns.GetHostName();
System.Environment.GetEnvironmentVariable("COMPUTE RNAME");
HttpContext.Current.Request.UserHostName;
System.Net.Dns.GetHostEntry(Request.ServerVariable s["remote_addr"]).HostName.ToString();
Has any one got any suggestion?
The head of HR is hounding me to complete this, hence the reason why I am looking at it on a sunday afternoon!
Comment