I am trying to get the computer name for the current user. I am able to get the IP address using
Thanks to all that answered this post.
Actually, the code was not the problem. There was nothing wrong with the code that I was trying or the suggestions made. I found out that the server DNS entry was not set up correctly.
Maybe this will help someone else.