Home All Groups Group Topic Archive Search About

System.Net.Sockets.SocketException Error

Author
15 Jan 2007 12:18 PM
Steve Lowe
Hi,

I have a VB.Net 2003 program that uses Indy to check if there are any
messages waiting on a POP mail server.

The program has been running fine for a few months, but last week
after Installing a network packet reading program called WireShark my
VB.Net program no longer runs and generates the following 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

The line that generates this error is :

Dim POPSver As New Indy.Sockets.POP3


Since the program was working fine before I know that there is no
problem with my actual code.

I guess there must be some settings that WireShark may have changed,
can you suggest what I need to look at to see why I'm getting this
error message.

I've re-installed Indy but still get the error message


Regards

Steve.




- Steve Lowe
- E-Mail : NO.SPAM.splowe@usa.net
-          Before Replying Remove .NO.SPAM
- UK Resident although my e-mail address is usa.net

Author
15 Jan 2007 12:50 PM
Newbie Coder
Steve!

What is the buffer you declared?

Need to know that because if you have a string builder of 256 chars & the
message exceeds that then you will get an insufficient buffer error, but
without seeing any code its not very easy to say where it is.

Provide more info if you want to get help

Newbie Coder
Author
15 Jan 2007 1:44 PM
Steve Lowe
On Mon, 15 Jan 2007 12:50:23 -0000 "Newbie Coder"
<newbie_coder@pleasespamme.com> wrote:

>Steve!
>
>What is the buffer you declared?
>
>Need to know that because if you have a string builder of 256 chars & the
>message exceeds that then you will get an insufficient buffer error, but
>without seeing any code its not very easy to say where it is.
>
>Provide more info if you want to get help
>
>Newbie Coder
>

Hi

Full code is below

Cheers,

Steve.


Imports Indy.Sockets
Imports Microsoft.Win32





Module Module1


    Sub Main()





        Dim POPSver As New Indy.Sockets.POP3     


        Dim Messages_On_Server As Integer
        Dim Last_Time_Messages_On_Server As Integer = 0
        Dim Last_Checked_At As Date = Now()
        Dim Message_String As String



        POPSver.Host = "pop.freeserve.net"




        POPSver.Username = "********"
        POPSver.Password = "********"



        POPSver.Connect()


        Try

            Messages_On_Server = POPSver.CheckMessages
            Last_Checked_At = Now()
            POPSver.IOHandler.WriteLn("Quit")
            POPSver.Disconnect()

        Finally

        End Try

        Message_String = "At : "
        Message_String = Message_String & Now() & "  : "
        Message_String = Message_String & Messages_On_Server
        Message_String = Message_String & "   Messages On Server."
        MessageBox.Show(Message_String)


    End Sub

End Module


- Steve Lowe
- E-Mail : NO.SPAM.splowe@usa.net
-          Before Replying Remove .NO.SPAM
- UK Resident although my e-mail address is usa.net