> Sorry for reposting. This one contains real email address.
Hi all,
I'm running the following program (see below), which tests connection to the
Microsoft FTP Site (207.46.133.140:21)
On several of our client's Windows XP machines, it generates WSAENOBUFS
error:
"An operation on a socket could not be performed because the system lacked
sufficient buffer space or because a queue was full."
While this code throws exception, Internet Explorer and FTP utility connect
fine. Is it possible to make this work in the framework? We cannot rewrite
our application now for Win32.
------------------- Module1.vb
Imports System.Net
Imports System.Net.Sockets
Public Class mySocket
Public Overloads Shared Sub Main()
Try
Dim s As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.IP)
s.Connect(New IPEndPoint(IPAddress.Parse("207.46.133.140"), 21))
s.Close()
MsgBox("OK")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class
------------------------------
Thanks.
Dmitriy Zakharov.
Tritech Financial Systems, Inc.
(416) 621-2020
"Jun Wan" - 21 Aug 2003 05:02 GMT
I did not encount such an issue. Socket works fine with .net framework on
my side.
Whether I use socket with window form or not, it works fine. Here is my
code I wrote it according to your description.
If you restart your machine, will the issue remain?
Imports System.Net
Imports System.Net.Sockets
Module Module1
Public Overloads Sub main()
Try
Dim s As Socket = New Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.IP)
s.Connect(New IPEndPoint(IPAddress.Parse("207.46.133.140"), 21))
s.Close()
MsgBox("OK")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Module
Regards,
Justin Wan
Microsoft Partner Online Support
This posting is provided "AS IS" with no warranties, and confers no rights.