469,929 Members | 1,401 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

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

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 ?
Nov 15 '05 #1
4 6638

"Sagaert Johan" <RE*******************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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 ?

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.InterNetwo rk,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.

Nov 15 '05 #2

"Sagaert Johan" <RE*******************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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 ?

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.InterNetwo rk,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.

Nov 15 '05 #3
"Sagaert Johan" <RE*******************@hotmail.com> wrote in message news:<OG**************@TK2MSFTNGP12.phx.gbl>...
"Sagaert Johan" <RE*******************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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 -

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)
http://www.wiley.com/WileyCDA/WileyT...471433012.html
Nov 15 '05 #4
"Sagaert Johan" <RE*******************@hotmail.com> wrote in message news:<OG**************@TK2MSFTNGP12.phx.gbl>...
"Sagaert Johan" <RE*******************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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 -

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)
http://www.wiley.com/WileyCDA/WileyT...471433012.html
Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by MSNews | last post: by
reply views Thread by Jinsu Park | last post: by
1 post views Thread by paulbubach | last post: by
reply views Thread by mvenkataraman | last post: by
reply views Thread by mvenkataraman | last post: by
2 posts views Thread by Steve Lowe | last post: by
1 post views Thread by Fresno Bob | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.