Groups | Blog | Home
all groups > dotnet sdk > august 2003 >

dotnet sdk : Repost: Unexpected Socket Error (WSAENOBUFS) on Windows XP / .NET 1.1



Dmitriy Zakharov
8/19/2003 10:31:42 PM
[quoted text, click to view]


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


justinew NO[at]SPAM online.microsoft.com (
8/21/2003 4:02:59 AM
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.
AddThis Social Bookmark Button