Home Forums .NET libraries Xceed SFTP/FTP for .NET SocketException : The attempted operation is not supported for the type of object referenced

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20990 |

    Hi. I have distributed my application to several users, all but one of whom are able to upload to my FTP site without error. However, for one user the following exception is being thrown. I believe this is being caught by my thread exception handler, so I am unable to determine the entry point which is the source of this stack, but my guess is FtpClient.Connect(string,int):

    SocketException : The attempted operation is not supported for the type of object referenced

    at System.Net.Sockets.Socket.get_ConnectEx()
    at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
    at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
    at Xceed.Utils.Security.Ssl.SecureSocket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
    at Xceed.Ftp.Engine.FtpCommandChannel.BeginConnect(IPEndPoint localAddress, IPEndPoint remoteAddress, AsyncCallback callback, Object state)

    I am not actually connecting over SSL so I’m not sure why I am seeing an SSL namespace in the stack (the connection in on port 21) but google points to a number of issues related to corrupt WinSock implementation and possibly the use of threadpool threads for asynchronous socket operations, but I wondered if anyone can give me any pointers. I cannot reproduce the error on my machine so any investigation will have to be done remotely.

    My FTP assembly is version 3.3.7113.3050

    I am not able to post full source code for my app, but here is a summary of the Xceed FTP calls being made:

    FtpClient client = new FtpClient();
    client.Timeout = myTimeout;
    client.Connect(myAddress, myPort);
    client.Login(myUsername, myPassword);
    client.ChangeCurrentFolder(myFolder);
    client.GetFolderContents(myFilename1);
    client.FileTransferStatus += new FileTransferStatusEventHandler(FtpClient_FileTransferStatus);
    client.SendFile(myStream, myFilename1, false);
    client.RenameFile(myFilename1, myFilename2);
    if (client != null)
    {
     client.FileTransferStatus -= new FileTransferStatusEventHandler(FtpClient_FileTransferStatus);
     if (client.Connected)
      client.Disconnect();
    }

    Thanks

    kh

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by kh (had 2763 views)

    Xceed Support
    Member
    Post count: 5658

    Other than updating the WinSock version on the client’s machine, we do not see what else to advice.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by CharlesB (had 3036 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.