Get my local ip address in a Citrix session
I have a simple c# windows code in Visual C# 2008 Express Ed, there I want to get my local computers ip address when running a Citrix session. The appl will run on the Citrix server in the users session, not as admin. I have used google to try to find a solution but failed.
Have anyone done this ?
Best regards /Mikael
Sam HobbsPosted Jun 15, 2011, 5:04 PM
after each line.
MikaelPosted Jun 15, 2011, 5:02 PM
knguyen_03Posted Jun 15, 2011, 3:58 PM
Could you please show me the C# code how to do it?
Thanks and Kind Regards,
Khanh
MikaelPosted Dec 11, 2009, 9:53 AM
Anwarul HaquePosted Dec 11, 2009, 6:14 AM
//using System.Net;
string strHostName, strIPAddress = "";
// Getting Ip address of local machine...
// First get the host name of local machine.
strHostName = Dns.GetHostName();
// Then using host name, get the IP address list..
IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
IPAddress[] addr = ipEntry.AddressList;
for (int i = 0; i < addr.Length; i++)
{
strIPAddress = addr[i].ToString();
break;
}
return strIPAddress;
Dipti ShahPosted Dec 10, 2009, 8:18 AM
Lalit MPosted Dec 10, 2009, 3:02 AM
http://www.codeproject.com/KB/winsdk/citrixIP.aspx?msg=2997926