Welcome to the Xceed Community Sign in | Join | Help
Community Search  

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

Sort Posts: Previous Next
  •  05-14-2008, 4:26 AM Post no. 12236

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

    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

     

  •  05-14-2008, 4:36 PM Post no. 12270 in reply to 12236

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

    Other than updating the WinSock version on the client's machine, we do not see what else to advice.
    Charles Bérubé-Rémillard
    Technical Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.