Hi,
Please can anyone help me out or give me idea how to solve above error.
I would like to save IP address for my form.
But when internet connection is off I got the above error of "Index was outside the bounds of the array".
Here is my code behind to save the IP:
string host = Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(host);
string ip = Convert.ToString(ipEntry.AddressList[2]);
The problem is when i get internet connection it was OK but when my internet is offline, I got the above error.
Can anyone give me idea why.
Thanks in advanced.
Go to the complete details ...