Groups | Blog | Home
all groups > c# > october 2003 >

c# : Error when constructing TcpClient : Error ...the system lacked insufficient buffer space or because a queue was full


rich_blum NO[at]SPAM juno.com
10/5/2003 9:32:50 PM
[quoted text, click to view]
Sagaert -

Have you checked to make sure the program has the proper security
settings to allow access to Sockets? Be careful when running network
programs from a shared network drive, or from accounts that do not
have the appropriate system priviledges. Hope this helps shed some
light on your problem.

Rich Blum - Author
"C# Network Programming" (Sybex)
http://www.sybex.com/sybexbooks.nsf/Booklist/4176
"Network Performance Open Source Toolkit" (Wiley)
Sagaert Johan
10/5/2003 11:49:40 PM
i get this error if i write this :

using System.Net.Sockets;

....

....
TcpClient tcp;
tcp=new TcpClient();



An unhandled exception of type 'System.Net.Sockets.SocketException' occurred
in system.dll

Additional information: An operation on a socket could not be performed
because the system lacked sufficient buffer space or because a queue was
full


Any hints ?

Sagaert Johan
10/6/2003 12:11:06 AM

[quoted text, click to view]
When creating a simple Socket i got something similar , i guess something is
wrong on my system

Socket sok;

sok=new
Socket(System.Net.Sockets.AddressFamily.InterNetwork,System.Net.Sockets.Sock
etType.Stream,System.Net.Sockets.ProtocolType.Tcp);

Yields this runtime error

An unhandled exception of type 'System.Net.Sockets.SocketException' occurred
in system.dll

Additional information: An operation on a socket could not be performed
because the system lacked sufficient buffer space or because a queue was
full

when i hit continue, this one pops up

An unhandled exception of type 'System.TypeInitializationException' occurred
in WindowsApplication4.exe

Additional information: The type initializer for "System.Net.Sockets.Socket"
threw an exception.




AddThis Social Bookmark Button