IPAddress construction allways rise an exception

  • Thread starter Thread starter taibo
  • Start date Start date
T

taibo

Hi,

did anyone meet this issue before ?

what I'm doing is just instanciating an IPAddress using the following code :

static void Main(string[] args)
{
IPAddress ipaddr = IPAddress.Parse("127.0.0.1");
}

or even
static void Main(string[] args)
{
long ip = 1895186770;
IPAddress ipaddr = new IPAddress(ip);
}



I get the following exception :

Unhandled Exception: System.TypeInitializationException: The type
initializer for "System.Net.IPAddress" threw an exception. --->
System.TypeInitializationException: The type initializer for
"System.Net.Sockets.Socket" threw an exception. --->
System.Net.Sockets.SocketException: An operation on a socket could not be
performed because the system lacked sufficient buffer space or because a
queue was full
at System.Net.Sockets.Socket.InitializeSockets()
at System.Net.Sockets.Socket..cctor()
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.InitializeSockets()
at System.Net.IPAddress..cctor()
--- End of inner exception stack trace ---
at System.Net.IPAddress.Parse(String ipString)
at IPTest.Class1.Main(String[] args) in e:\source\iptest\class1.cs:line
20


I am using the .Net Framework v1.1, not sure if this is related to this or
not.

Any pointers/advice most welcome

Regards,

Thibaut
 
Do you have more than 50 adapters installed on the machine ? They need not
be physical adapters, even virtual adapters might be the reason. What
happens is that if there are more than 50 adapters on the machine, this
situation can happen. It is a known bug.

You can find a QFE for this at
http://support.microsoft.com/default.aspx?scid=kb;[LN];826757

--
Remove "user" from the email address to reply to the author.

This posting is provided "AS IS" with no warranties, and confers no rights

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
Back
Top