By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,188 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,188 IT Pros & Developers. It's quick & easy.

System.TypeInitializationException when creating a TcpClient ???

P: n/a

this code

using System;
using System.Net.Sockets;

namespace ConsoleApplication1
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
TcpClient my_client =new TcpClient();

An unhandled exception of type 'System.TypeInitializationException' occurred
in system.dll

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

This is the innerException generated

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 ---

Whats wrong ???

This error does not happen on my laptop.
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.