I’m settin up an outcome log for some users of my processes.
I’m facing two issues.
- I’m retrieving the ipAddress in this way:
Declaring the Dns variable as :
Dns = System.Net.Dns
then assigning it to ipAddress:
the issue is that UIPath seems to do not accept Dns :
it means: “Dns is a Net type, so can’t be used as expression”
Can anyone help me resolving this?
- the second issue is that I can’t find anything that allows me to get the Robot Name. I’m able to get the machine name, but I’d love to refer in log to the Ronot name, the one in yellow here:
Does anyone know how to get this? (if it’s possible)
Thanks a lot!
Hi Maria, what did I missed?
No sorry, i deleted my response. Gave the wrong answer
Is the variable dnsName set to type System.Net.Dns
Kindly have a view in this thread
thank you for n°2!
about n° 1:
dnsName isalready set as Dns.Net.Dns !
Try this, keep the variable type as System.Net.NetworkInformation.NetworkInterface
and the expressiong is System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces
Then do a for each loop:
get the properties by NetworkInteface.GetIPProperties()
Then from that get the dns address like IpProperties.DnsAddresses.
You will arrive at the final step heree:
Looping through all DNS addresses and finding the right one you need.
for ip address declare the variable as String:
Dim strIPAddress As String = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName).AddressList(0).ToString
Try this in a writeline activity and you will see the IP Address.