EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File handle and TElSimpleSFTPClient.UploadFile

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#5193
Posted: 02/28/2008 11:12:49
by jd liau (Basic support level)
Joined: 02/28/2008
Posts: 3

We are getting System.ArgumentOutOfRangeException in UploadFile method, and when it happens the uploading file is locked. So, if user trying again the upload fails because the same file name is being locked from the previous upload.

My question is how do we unlock the file if UploadFile is used in the exception handler?

Code
        public bool Upload(FileInfo localFile, out string failReason)
        {
            failReason = null;

            if(sftpClient.Active == false || localFile == null)
                return false;

            if(localFile.Exists == false)
            {
                failReason = "Source file does not exist: " + localFile.FullName;
                return false;
            }

            try
            {
                sftpClient.UploadFile(localFile.FullName, Path.Combine(currentDir, localFile.Name), TSBSFTPFileTransferMode.ftmOverwrite);
            }
            catch(Exception e)
            {
                failReason = String.Format("Error uploading file '{0}': {1}", localFile.Name, e.Message);
                return false;
            }

            return true;
        }
#5194
Posted: 02/28/2008 11:41:28
by Eugene Mayevski (EldoS Corp.)

It doesn't look like you are passing the valid remote name and this might be the reason.

Can you please specify the sample values for both parameters in the call to UploadFile?

Also please specify the exact build number of SecureBlackbox that you are using. It can be found in SecureBlackbox assembly properties.


Sincerely yours
Eugene Mayevski
#5195
Posted: 02/28/2008 12:01:36
by jd liau (Basic support level)
Joined: 02/28/2008
Posts: 3

Thanks for your reply!

4.4.0.94 is the version we are using.

Sample parameters for UploadFile:
Param1: "C:\AppServer\Application­s\GrammarTest\MediaFiles\­en-US\user43.wav"
Param2: "C:\MediaServer\Audio\Gra­mmarTest\MediaFiles\en-US­\user43.wav"

The is random issue. We can deploy the same content many times before the error happens.


#5196
Posted: 02/28/2008 12:23:22
by Eugene Mayevski (EldoS Corp.)

This version is very old (version 6 will be released within a week) and has a bug in UploadFile method (in .NET edition only). This problem has been solved in SBB 5.


Sincerely yours
Eugene Mayevski
#5197
Posted: 02/28/2008 14:04:56
by jd liau (Basic support level)
Joined: 02/28/2008
Posts: 3

Thanks Eugene. The person purchased our copy of SBB is not here anymore and what we have is the license key information. Can you point me where version upgrade information is? Do we need to pay upgrade fee for it and how much?

#5198
Posted: 02/28/2008 14:24:53
by Eugene Mayevski (EldoS Corp.)

This question has been moved to HelpDesk.


Sincerely yours
Eugene Mayevski
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 1963 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!