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

    Question

  • i have made a client server program by c#.i use tcpListenet in server an i have 2 socket one for comunucate with local clients and another for remot client with "valid ip" and internet.when i run my server it first work but after some work by client "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full" occure and then i cant run the server or even work with my ie.i have adsl connection and 2 valid ip,on for adsl modem and one for network kart,moreever when this error ocurre no port can open by my program.

    {

    ServerListener =

    new TcpListener(5000);

    ServerListener.Start();

    }

     

    catch (SocketException se)

    {

     

    Program.handleException("ERROR:551(office)" + se.Message);

     

    Application.Exit();

    }

    Thursday, April 23, 2009 8:03 AM

All replies

  • What operation does this occur on.  Please show us the full exception and stack trace. :-)
    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Thursday, April 23, 2009 10:53 AM
  • hi thanks for your reply
    hear is my stack trace.

    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.TcpClient..ctor(String hostname, Int32 port)
       at server.clientChecker.checkClient() in D:\Backup\Pardis\new880109\server\server\clientChecker.cs:line 36

    just this.
    this error occurs in tcplistener & tcpclient only when i connect to internet and after a few minutes and then my ie dont work.when i disable internet connection my program work pefectly but after reanbling Internet connection this exception occurs again.please help me i dont have enough time.

    Saturday, April 25, 2009 1:54 PM
  • Hmm I was hoping for a longer stack trace, the error is coming from within the Socket class so we should see a method call there.

    Presumably other network applications are working, your web browser can connect fine?  Are there any event added to the Event Log when your program fails (apart from the .NET 'program crashed' event)?

    One possibility is that some firewall or virus scanner product has installed itself in the Winsock stack as an LSP (Layered Service Provider) and is misbehaving.  Do you see any third-party providers listed in C:\>netsh winsock show catalog

    Have you tried running your program on another machine.  Does it work there?
    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Monday, April 27, 2009 10:42 AM