I am trying to troubleshoot a script on a tag that uses the system.net functions. Essentially, we are trying to store some gateway information in some custom tags, which are later on used on some more elaborate navigation scripting across all ignition gateways in our campus.
We created a tag that stores the gateway IP address and hostname among other info, and we have a script that uses the system.net.getIpAddress() and system.net.getHostName() functions to pull this data into the tag, but the data being returned from both functions is null.
I even tried creating individual tags that run nothing but these system scripts, but I am still only receiving null data into those tags. Has anyone run into a similar issue?
Thanks for your reply, looks like it was a problem caused by our domain controller being down. Not too sure how the issues were related, but the functions now work as expected!
If there's only one, I think. Keep in mind that the function looks at the gateway's IP address when running in a Perspective script. For Perspective, you should be using session.props.host value.