0 Replies - 1904 Views - Last Post: 04 February 2010 - 02:17 PM

#1 MarmiteX1  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 159
  • Joined: 17-October 09

A Socket Operation encountered a dead network

Posted 04 February 2010 - 02:17 PM

Hi,

I've started to learn to develop applications for mobile devices.

Now i have written some code to get the IP Address of a domain by entering the URL into the textbox but an error message keeps appearing such as this:

Quote

A Socket Operation encountered a dead network


string hostName = textBox1.Text;
MessageBox.Show("Local HostName: " + hostName);
IPHostEntry myself = Dns.GetHostEntry(hostName);
foreach (IPAddress address in myself.AddressList)
{
  MessageBox.Show("IP Address " + address.ToString());
}



I looked at the error code and this is what it means:

Quote

10050
Network is down.
A socket operation encountered a dead network. This could indicate a serious failure of the network system (that is, the protocol stack that the Windows Sockets DLL runs over), the network interface, or the local network itself.


But i can actually ping my router fine. I can browse the internet.

I am using Windows Vista Home Premium on a wireless laptop. I am connecting to the internet wirelessly

Can anybody please help?

Thanks,

This post has been edited by MarmiteX1: 04 February 2010 - 02:43 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1