System.Net.Sockets.SocketException Error

S

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 : (e-mail address removed)
- Before Replying Remove .NO.SPAM
- UK Resident although my e-mail address is usa.net
 
N

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
 
S

Steve Lowe

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 : (e-mail address removed)
- Before Replying Remove .NO.SPAM
- UK Resident although my e-mail address is usa.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top