Get User IP & WorkStation Name in InfoPath Form
How To Get The IP Address & WorkStation Name of the user opening and InfoPath Form
Create an OnLoad Event
// Get PC Name and IP Address of current user
XPathNavigator root = MainDataSource.CreateNavigator();
//Get the values
string MyComputerName = root.SelectSingleNode(“
string MyIPAddress = root.SelectSingleNode(“/
string OS = root.SelectSingleNode(“/
try
{
root.SelectSingleNode(“/
root.SelectSingleNode(“/
root.SelectSingleNode(“/
}
catch (Exception ex)
{
NotifyHost(“The following error occured: ” + ex.Message.ToString());
}
Hi, Great post! I've spent quite some time looking for exactly this code, but I'm having some trouble with trying to implement this:
HTTPContext is null at the time I try to reference Current.Request.UserHostAddress.
Any ideas?
Thanks!