Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all 3865 articles
Browse latest View live

Answered: How to resume full directory upload?

$
0
0

At first, I will comment points 1 and 2:

  1. The ProblemDetected event is raised during any Download method, not only the one with two parameters overload.
    It is limitation of our documentation system. We had to either specify cref to one of the overloads or not use cref at all. We decided to use cref of the shortest overload.

  2. If the error causes the Ftp object to be unusable anymore, there is no need to raise ProblemDetected event and the exception is thrown immediately.
    The ProblemDetected event is designed to solve the problem of the current file so the whole process can continue. If the Ftp object is unusable (e.g. connection is lost) the event has no meaning.

Now, to your "Timeout exceeded" errors:

You can increase the timeout value by Ftp.Timeout property. However, I don't think it will solve your problem (but you can try).

I think, that the problem is at the server side. The FTP protocol uses two connections: control and data. Control connection is used for commands, data connection is used for sending data of files.
When a long file is transferred, there is no communication on the control connection and this will cause the timeout at the server side.
To keep the control connection alive, set the Ftp.Settings.KeepAliveDuringTransfer to true. Alternatively change the interval like this Ftp.Settings.KeepAliveDuringTransferInterval = 45;

If this doesn't help, please send us communication log for analysis to support@rebex.net, we hopefully spot something. You can create it as described here.

And finally, to your question:

To resume previously aborted transfer, you can use ActionOnExistingFiles.ResumeIfPossible value as last parameter of the Upload method. However, this will not work as expected in your case.

You are calling the Upload method for the first time with ActionOnExistingFiles.OverwriteAll. This means, replace content of all existing files. The ResumeIfPossible works this way:

  • if a file doesn't exist on target, upload whole file
  • if a file exists on target and has smaller length than the original file, upload only remaining part
  • if a file exists on target and has length equal or larger than the original file, do nothing (skip the file)

However, you would like to do something little bit different:

  • skip successfully transferred files
  • resume aborted file
  • overwrite all remaining files

This can be done, but you have to remember, which files you already transferred.
With a little effort you can do it like this:

// holds progress of the transfer
var progress = new Dictionary<string, bool>();

// initialize client object
var client = new Rebex.Net.Ftp();

// updates progress dictionary
client.TransferProgressChanged += (s, e) =>
{
    switch (e.TransferState)
    {
        case TransferProgressState.FileTransferring:
            if (!progress.ContainsKey(e.TargetPath))
                progress[e.TargetPath] = false; // uncompleted file
            break;
        case TransferProgressState.FileTransferred:
            progress[e.TargetPath] = true; // completed file
            break;
    }
};

// solves problems of existing files
client.ProblemDetected += (s, e) =>
{
    // handle only FileExists problems
    if (e.ProblemType == TransferProblemType.FileExists)
    {
        bool state;
        // determine target path
        string targetPath = (e.Action == TransferAction.Uploading) ? e.RemotePath : e.LocalPath;
        if (progress.TryGetValue(targetPath, out state))
        {
            if (state)
                e.Skip(); // completed file
            else if (e.IsReactionPossible(TransferProblemReaction.Resume))
                e.Resume(); // uncompleted file
            else
                e.Overwrite(); // suspicious for skip, but rather overwrite
        }
        else
        {
            e.Overwrite(); // unknown file
        }
    }
};

With this, your try…catch…retry construct will work as expected.


cozyroc ssis+ is not working on new server?

$
0
0

Hi everyone, we migrated sql jobs and ssis packages from old to new server.
However on the new server, we cannot connect using cozyroc SSH connection manager.

These are the cozyroc ssis+ versions on the 2 servers:
old server: cozyroc ssis+ 1.5.101.0
new server: cozyroc ssis+ 1.6.101.0

We have 2 ssis packages encountering 2 errors:

package 1

SshSession 3.0.4696.0.
Server is 'SSH-2.0-OpenSSH7.4'
SSH: Sending packet SSH
MSGKEX30 (5 bytes).
SSH: Received packet SSHMSGUNIMPLEMENTED (5 bytes).
SSH: Negotiation failed: Rebex.Net.SshException: Key exchange failed. Requested service is not implemented.

package 2

SshSession 3.0.4696.0.
Server is 'SSH-2.0-OpenSSH7.1'.
SSH: Sending packet SSH
MSGKEX30 (5 bytes).
SSH: Sending packet SSHMSGDISCONNECT (76 bytes).
SSH: Negotiation failed: Rebex.Net.SshException: Key exchange failed. The operation was not completed within the specified time limit.

What could be the reason for this errors?

TIA!

Answered: cozyroc ssis+ is not working on new server?

$
0
0

Hi, this is a support forum for existing or potential Rebex customers. If you use Rebex components through third-party products, please contact the product vendor for support instead.

However, in this particular case, I can at least say that:

  • The third-party product you are using is based on an outdated version of Rebex components. It's more than 4 years old. It doesn't support SHA-2, lacks Logjam attack mitigation, has outdated insecure ciphers enabled by default, and so on. Check out our release history for details.

  • Those 2 errors seem to be caused by a compatibility issue that has already been solved. Try connecting using one of our samples to make sure the latest version works fine with those 2 servers.

[Rebex.SFTP] Error Opening/Creating file in .NET CF

$
0
0

Hello

I try to get files from server in SFTP and i have no problem Download an xml file but for others files i have this error :

Exception message : "Failure; Error opening/creating file /Label/20160325_Format_1.prn."

In Log :

2016-10-24 10:57:20 Opening log file.
2016-10-24 10:57:20 Using FileLogWriter version 2.0.6083.0.
2016-10-24 10:57:22 INFO Sftp(1)[1802216234] Command: SSH_FXP_REALPATH (2, '/Label/')
2016-10-24 10:57:22 INFO Sftp(1)[1802216234] Response: SSH_FXP_NAME (2, 1 item)
2016-10-24 10:57:22 INFO Sftp(1)[1802216234] Command: SSH_FXP_STAT (3, '/Label')
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Response: SSH_FXP_ATTRS (3)
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Command: SSH_FXP_OPENDIR (4, '/Label')
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Response: SSH_FXP_HANDLE (4, 0x0)
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Command: SSH_FXP_READDIR (5, 0x0)
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Response: SSH_FXP_NAME (5, 9 items)
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Command: SSH_FXP_READDIR (6, 0x0)
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Response: SSH_FXP_STATUS (6, 1, 'No files')
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Command: SSH_FXP_CLOSE (7, 0x0)
2016-10-24 10:57:23 INFO Sftp(1)[1802216234] Response: SSH_FXP_STATUS (7, 0, '')
2016-10-24 10:57:24 INFO Sftp(1)[1802216234] Command: SSH_FXP_OPEN (8, '/Label/20160325_Format_1.prn', 1)
2016-10-24 10:57:24 INFO Sftp(1)[1802216234] Response: SSH_FXP_STATUS (8, 4, 'Error opening/creating file /Label/20160325_Format_1.prn')
2016-10-24 10:57:24 ERROR Sftp(1)[1802216234] Info: Rebex.Net.SftpException: Failure; Error opening/creating file /Label/20160325_Format_1.prn.
à Rebex.Net.AFD.YG(AZD HU, Type UU)
à Rebex.Net.AFD.UG(String HU, UKD UU, Boolean GU, KZD AU)
à Rebex.Net.Sftp.PY(KZD HU, String UU, Stream GU, Int64 AU, Int64 IU, BDD DU)
à Rebex.Net.Sftp.PY(FileMode HU, KZD UU, String GU, String AU, Int64 IU, Int64 DU, Int64 SU, BDD ZU)
à Rebex.Net.Sftp.AY(FileMode HU, String UU, String GU, Int64 AU, Int64 IU, Int64 DU, BDD SU)
à Rebex.Net.Sftp.GetFile(String remotePath, String localPath)
à MtcFtp.MtcFtp.ftpGetFile(String filename)
à AutoUpdaterDotNET.AutoUpdater.WaitCallBackDoWork(Object sender)
à System.Threading.ThreadPool.WorkItem.doWork(Object o)
à System.Threading.Timer.ring()

I'm sure the file exist, there is no need to create.
With another SFTP lib, i haven't this problem.

Best regards

Answered: How to use rebex in a virtual file system in which compressed archives (zipfiles) can be read similar to disk files

$
0
0

At the moment, you would have to implement an abstraction layer above Rebex ZIP, Rebex FTP/SFTP and System.IO yourself to achieve this.

However, we are currently adding a virtual file system API to Rebex File Server, and it looks like it might be suitable for this scenario as well - thanks for the tip!

How to decrease thread priority of SFTP server

$
0
0

Hi, we have a Rebex SFTP server running on a low end PDA device under Windows CE 6.0.
The problem is that while there is file transfer going on, the SFTP server seems to take 100% CPU and the GUI isn't responding any more.
I'm aware that enciphering/deciphering takes some effort.
So, is it possible to lower the thread priority of the SFTP server so the rest of the system gets responsive again? I think it's not an option to increase all other threads' priorities because as far as I know the Windows GUI's priority cannot be changed.

Thanks!

Answered: Trying to sync files/folder structure on two remote PCs

$
0
0

The biggest problem in folder synchronization is solving file conflicts. Imagine that you are in fully synchronized state. Now, at the same moment, two users start to modify “data.txt” file – one on the computer 1, second on the computer 2. Both users save their changes. Now, automated synchronization process detects changes of “data.txt” file and tries to synchronize it – unfortunately, it cannot resolve the conflict automatically, so it has to leave it for user interaction or it can take some defined actions e.g. transfer “data.txt” file from computer 1 to computer 2 and name it “data.txt.sync.computer1”.

This is general problem, but if you cannot encounter this, folder synchronization should be “easy” task.
You need to keep track of all files, so you can determine which ones were changed, deleted or created since last synchronization. Which means you need to have some kind of database.
You can use SFTP protocol as transport layer. Rebex File Server implements server side and Rebex SFTP implements client side. With planned virtual file system (available in beta version of Rebex File Server yet) you will be able to store data on server in any format (file system, database, online storage provider, etc.). Moreover, you have both client and server completely under your control, so you can implement any custom command e.g. give me list of changed/deleted/created files, etc.

However, this will still take a lot of coding, so maybe you can look around for some existing solution or consider using some cloud solution.

Answered: How to decrease thread priority of SFTP server

$
0
0

There is no quick obvious straightforward solution to this, and we needed to do some investigation first. Sorry for the late answer, and thanks for sharing your research.

I'll address your solutions first:

1) This is an obvious solution, but hard to do in practice, as you already found out.

2) There is no dedicated thread pool used only by the SFTP server code, which means decreasing thread priority is not a viable option - doing so using a PathAccessAuthorization event would actually affect the current thread indefinitely, which is undesirable because the same thread could be used by other parts of the application later. Despite this limitation, the approach might be usable in scenarios where you have complete control over all other threads.

And some other ideas:

3) I'm sure the SFTP server code could be optimized further to be faster, and we will most likely look into this in future. However, many of the optimizations we would like to do are not suitable for .NET Compact Framework and Windows CE 6.0. In fact, it's quite possible that the far-from-ideal speed on these platforms might be caused by some of the features we use, such as asynchronous socket API. Unfortunately, .NET CF is already a legacy platform that has been deprecated by its vendor years ago, which means substantial enhancements in this area no longer make financial sense.

4) Throttling the data flow at the socket level seems to be the most simple way to mitigate this issue. This would make the whole SFTP server run "slower" and therefore consume less CPU power (simply because it would spent more time waiting for data to arrive or get sent). However, this would require us to add support for custom transfer layers to Rebex File Server first. We will look into this when we are done with the upcoming Rebex HTTPS component.


Answered: POP3 with outlook.office365.com gives timeout exception but works with IMAP

$
0
0

The port number for Office365 POP3 is 995, which corresponds to SslMode.Implicit. Please, change the Connect method call to:

client.Connect("outlook.office365.com", SslMode.Implicit);

Answered: Does Installing Rebex SFTP .NET Library on Windows Server 2012 also register them to the GAC?

TransferProgressChanged event is always triggered twice when progress percentage is 100

$
0
0

TransferProgressChanged event is always triggered twice when progress percentage is 100, Do you know why it behaves of this way?

thanks in advance.

Progress percentage of a file in FileServer component?.

$
0
0

I'm using Sftp and FileServer components, and I was wondering if there is a way to let the FileServer know about the progress percentage of a file.

thanks in advance.

FTPS Socket Closed While Negotiation In Progress

$
0
0

We have a requirement from a client to start using FTPS instead of FTP in one of our applications. Two weeks ago I downloaded the trial version of the Rebex FTP component, added it to my program, and everything was working perfectly.

We are ready to implement the new version, so I upgraded to the full version of the control, updated the references in my project and rebuilt, and now my FTPS connection is getting closed as soon as I try to secure it.

To make sure it wasn't something in my code, I ran the sample WinForms app, and it's giving the same error. Here is the log from the sample app:

Welcome to Rebex FTP!
08:18:16.217 Info Info: Connecting to xx.xx.xxx.xxx:21 using Ftp 4.0.6083.0.
08:18:16.219 Info Info: Using proxy none.
08:18:16.271 Debug Info: Connection succeeded.
08:18:16.309 Verbose Info: Received data over control connection: 
 0000 |32-32-30-20-4D-69-63-72 6F-73-6F-66-74-20-46-54| 220 Microsoft FT
 0010 |50-20-53-65-72-76-69-63 65-0D-0A               | P Service..
08:18:16.321 Info Response: 220 Microsoft FTP Service
08:18:16.338 Verbose Info: Sent data over control connection: 
 0000 |41-55-54-48-20-54-4C-53 0D-0A                  | AUTH TLS..
08:18:16.340 Info Command: AUTH TLS
08:18:16.365 Verbose Info: Received data over control connection: 
 0000 |32-33-34-20-41-55-54-48 20-63-6F-6D-6D-61-6E-64| 234 AUTH command
 0010 |20-6F-6B-2E-20-45-78-70 65-63-74-69-6E-67-20-54|  ok. Expecting T
 0020 |4C-53-20-4E-65-67-6F-74 69-61-74-69-6F-6E-2E-0D| LS Negotiation..
 0030 |0A                                             | .
08:18:16.368 Info Response: 234 AUTH command ok. Expecting TLS Negotiation.
08:18:16.372 Debug Info: Upgrading control connection to TLS/SSL.
08:18:16.407 Verbose TLS: Sent TLS packet: 
 0000 |16-03-03-00-85-01-00-00 81-03-03-58-18-88-08-47| ...........X...G
 0010 |94-0C-5F-8C-6F-B3-48-C0 BA-AC-95-33-AF-4D-82-F0| .._.o.H....3.M..
 0020 |BE-4D-93-BE-36-68-95-CC 03-5B-C9-00-00-32-00-6B| .M..6h...[...2.k
 0030 |00-67-00-3D-00-3C-00-6A 00-40-00-33-00-39-00-2F| .g.=.<.j.@.3.9./
 0040 |00-35-00-32-00-38-00-16 00-0A-00-13-00-05-00-04| .5.2.8..........
 0050 |00-66-00-15-00-09-00-12 00-62-00-64-00-63-00-65| .f.......b.d.c.e
 0060 |01-00-00-26-00-00-00-12 00-10-00-00-0D-31-30-2E| ...&.........10.
 0070 |34-38-2E-32-34-33-2E-31 32-34-00-0D-00-0C-00-0A| 48.243.124......
 0080 |06-01-05-01-04-01-02-01 02-02                  | ..........
08:18:16.412 Info TLS: State StateChange:Negotiating
08:18:16.414 Debug TLS: HandshakeMessage:ClientHello was sent.
08:18:16.444 Debug TLS: TLS socket was closed, 0 bytes of data were received.
08:18:16.446 Info TLS: State StateChange:Closed
08:18:16.447 Debug TLS: TLS socket closed while negotiation was in progress.
08:18:16.450 Debug TLS: Closing TLS socket.
08:18:16.461 Error Info: Rebex.Net.TlsException: Connection was closed by the remote connection end. ---> Rebex.Net.TlsException: Connection was closed by the remote connection end.
   at Rebex.Net.MBG.IC()
   at Rebex.Net.TlsSocket.Negotiate()
   at Rebex.Net.KFG.PW(TlsParameters U)
   at Rebex.Net.Ftp.EE(TlsParameters U, FtpSecureUpgradeType W)
   at Rebex.Net.Ftp.NV(String U, Int32 W, TlsParameters C, SslMode Q, FtpSecureUpgradeType J)
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.NV(String U, Int32 W, TlsParameters C, SslMode Q, FtpSecureUpgradeType J)
* Rebex.Net.TlsException: Connection was closed by the remote connection end. ---> Rebex.Net.TlsException: Connection was closed by the remote connection end.
   at Rebex.Net.MBG.IC()
   at Rebex.Net.TlsSocket.Negotiate()
   at Rebex.Net.KFG.PW(TlsParameters U)
   at Rebex.Net.Ftp.EE(TlsParameters U, FtpSecureUpgradeType W)
   at Rebex.Net.Ftp.NV(String U, Int32 W, TlsParameters C, SslMode Q, FtpSecureUpgradeType J)
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.NV(String U, Int32 W, TlsParameters C, SslMode Q, FtpSecureUpgradeType J)
   at Rebex.Net.Ftp.KD(Object U, Enum W, Object[] C)
   at Rebex.BQG.WW(Object U)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Rebex.Samples.MainForm.<btnConnect_Click>d__7.MoveNext()

I have tried to rule out everything I could think of by accepting any certificate, and allowing all protocols and ciphers, but I get the same error regardless.

To make sure it's not a server configuration error (which hasn't changed since I tested the trail version 2 weeks ago) I tried connecting with filezilla and had no issues. Here's that log:

2016-10-31 12:03:42 9364 1 Status: Connecting to xx.xx.xxx.xxx:21...
2016-10-31 12:03:43 9364 1 Status: Connection established, waiting for welcome message...
2016-10-31 12:03:43 9364 1 Response: 220 Microsoft FTP Service
2016-10-31 12:03:43 9364 1 Command: AUTH TLS
2016-10-31 12:03:43 9364 1 Response: 234 AUTH command ok. Expecting TLS Negotiation.
2016-10-31 12:03:43 9364 1 Status: Initializing TLS...
2016-10-31 12:03:43 9364 1 Status: Verifying certificate...
2016-10-31 12:03:43 9364 1 Status: TLS connection established.
2016-10-31 12:03:43 9364 1 Command: USER *********
2016-10-31 12:03:43 9364 1 Response: 331 Password required
2016-10-31 12:03:43 9364 1 Command: PASS *********
2016-10-31 12:03:43 9364 1 Response: 230 User logged in.
2016-10-31 12:03:43 9364 1 Command: SYST
2016-10-31 12:03:43 9364 1 Response: 215 Windows_NT
2016-10-31 12:03:43 9364 1 Command: FEAT
2016-10-31 12:03:43 9364 1 Response: 211-Extended features supported:
2016-10-31 12:03:43 9364 1 Response:  LANG EN*
2016-10-31 12:03:43 9364 1 Response:  UTF8
2016-10-31 12:03:43 9364 1 Response:  AUTH TLS;TLS-C;SSL;TLS-P;
2016-10-31 12:03:43 9364 1 Response:  PBSZ
2016-10-31 12:03:43 9364 1 Response:  PROT C;P;
2016-10-31 12:03:43 9364 1 Response:  CCC
2016-10-31 12:03:43 9364 1 Response:  HOST
2016-10-31 12:03:43 9364 1 Response:  SIZE
2016-10-31 12:03:43 9364 1 Response:  MDTM
2016-10-31 12:03:43 9364 1 Response:  REST STREAM
2016-10-31 12:03:43 9364 1 Response: 211 END
2016-10-31 12:03:43 9364 1 Command: OPTS UTF8 ON
2016-10-31 12:03:43 9364 1 Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON.
2016-10-31 12:03:43 9364 1 Command: PBSZ 0
2016-10-31 12:03:43 9364 1 Response: 200 PBSZ command successful.
2016-10-31 12:03:43 9364 1 Command: PROT P
2016-10-31 12:03:43 9364 1 Response: 200 PROT command successful.
2016-10-31 12:03:43 9364 1 Status: Logged in
2016-10-31 12:03:43 9364 1 Status: Retrieving directory listing...
2016-10-31 12:03:43 9364 1 Command: PWD
2016-10-31 12:03:43 9364 1 Response: 257 "/" is current directory.
2016-10-31 12:03:43 9364 1 Command: TYPE I
2016-10-31 12:03:43 9364 1 Response: 200 Type set to I.
2016-10-31 12:03:43 9364 1 Command: PASV
2016-10-31 12:03:43 9364 1 Response: 227 Entering Passive Mode (xx,xx,xxx,xxx,xxx,xxx).
2016-10-31 12:03:43 9364 1 Command: LIST
2016-10-31 12:03:43 9364 1 Response: 150 Opening BINARY mode data connection.
2016-10-31 12:03:43 9364 1 Response: 226 Transfer complete.
2016-10-31 12:03:43 9364 1 Status: Directory listing of "/" successful
2016-10-31 12:03:48 9364 1 Status: Disconnected from server

The server is a Windows 2012 server running IIS 8.5. It has been configured to allow secure connections.

Any help would be greatly appreciated!

Answered: TransferProgressChanged event is always triggered twice when progress percentage is 100

$
0
0

Please note, that the SftpTransferProgressChangedEventArgs object contains TransferState property. It tells you, in which state the event was raised.

The first 100% occurred in state DataBlockProcessed. The second one occurred in state FileTransferred.

For a small file, the TransferProgressChanged event will raise with this values:

FileTransferring: 0%
DataBlockProcessed: 100%
FileTransferred: 100%

In multi file operation (Download or Upload method) it will look like this:

FileTransferring: 0%
DataBlockProcessed: 100%
FileTransferred: 100%
TransferCompleted: 100%

Can Rebex return message id of email that is sent?

$
0
0

I create an email without message id and send the mail, I then store it after it is sent. I find that the message id of the stored mail and the message id of the same email from the recipient account do not match.


Answered: Progress percentage of a file in FileServer component?.

$
0
0

This is quite tricky. Despite its name, the SFTP protocol is not actually a simple file transfer protocol with operations such as "upload file" and "download file".

Instead, it's a remote file system protocol featuring a POSIX-like API. This means that to a server, each transfer appears as a sequence of calls to methods that look somewhat like this:

Handle OpenFile(string path, OpenMode openMode, AccessMode accessMode);
int Read(Handle handle, long position, byte[] buffer, int offset, int count);
void Write(Handle handle, long position, byte[] buffer, int offset, int count);
void Close(Handle handle);

The problem with this is the fact that when the client opens a file for reading or writing, the server doesn't get any idea about what it actually intends to do. If the client opened the file for writing, the server doesn't know how many bytes the client is going to transfer. If the client opened the file for reading, the server doesn't know whether the client actually intends to download the whole file, or only a part of it. Additionally, it's perfectly acceptable for client to access random parts of the file, and even to perform both write and read requests.

This said, if both the SFTP client and SFTP server are under your control and based on Rebex components, the most sensible way to achieve this would be to add a custom SFTP extension the client could use to transmit some "transfer info" structure, informing the server app about what it's trying to achieve or what's currently going on. The server app could in turn use this information to do whatever it needs.

Do you think this approach would be usable in your scenario? Rebex SFTP and Rebex File Server currently don't support custom extensions, but we will consider adding that.

Using Rebex.sftp, how to connect to a server shared folder with specific credentials, grab a file and sftp it out

$
0
0

Hello,

using an SSIS script task with Rebex.Net.Sftp I need to follow the steps described below:

1- Connect to a shared folder with specific credentials to access a file (pending)
2- Sftp the file out with Rebex.Net.Sftp (accomplished)

How can I stablish a connection passing specific credentials to access a shared folder on an external server to access the file that I need to transport to the ftp folder?

I am assuming that
client.Upload(@"\Sharedfolderpath\File.txt","ftpfolder")
will not work because in order to connect to \Shared
folder_path I have to pass specific credentials.

Is there a way I can pass the credentials to access \Sharedfolderpath\File.txt before I call client.Upload?

Can Rebex provide option to save sent email by default on email send? (Without calling explicit save)

$
0
0

After I send a mail from my gmail or outlook account using Rebex, I can get the sent mail in the sent folder of
these accounts. But for accounts like yahoo, aol, it is not saved in sent folder.

Answered: Using Rebex.sftp, how to connect to a server shared folder with specific credentials, grab a file and sftp it out

Compressed files with 7-zip 9.20 64-Bit on Ubuntu 16.04 TLS can not extracted

$
0
0

Hi Rebex-Team,

i have here a ZIP-Archive from a external team, that i must extract automatically to using in another program.

The archive was created with 7-zip 9.20 64-Bit on Ubuntu 16.04 TLS. The command was:

7z a "test_ubuntu.zip""/tmp/test"

It seems that 7-zip does not store the File-Attribute in the Archive to the file (ZipItem.IsFile or ZipItem.ItemType = ArchiveItemType.File).

Extracting of the files with any Zip-Programs (WinRAR, WinZip, 7-zip) is possible without problems.

Is it possible in any way to extract the files? Follwing i have tried:

  • ZipItem.ExtractToFile("C:\test\"& ZipItem.Name, Rebex.IO.ActionOnExistingFiles.OverwriteAll)

  • ZipItem.ExtractToDirectory("C:\", Rebex.IO.TraversalMode.NonRecursive, Rebex.IO.ActionOnExistingFiles.OverwriteAll)

  • Extracting the whole Archive with ZipArchive.ExtractAll("C:\test", Rebex.IO.TransferMethod.Copy, Rebex.IO.ActionOnExistingFiles.OverwriteAll)

  • I have nothing found in the options under ZipArchive.Options, especially .UnsupportedFeatureExtractMode

  • Tried several Events of the ZipArchive-Class

Nothing works. Is there any way to force the extraction of the files (for example overwriting the ZipItem.ItemType-Property or additional Options ZipArchive.Options.UnsupportedFeatureExtractMode)?

I have uploaded a sample ZIP-File here.

I have another Library (DevExpress) here, that can handle those Archives. But this Library have no equal PasswordRequired-Event.
In addition, i would realize this only with the Rebex-Librarys, because the Zip-Arichives send via Mail.

Thanks + Regards
Bernhard

Viewing all 3865 articles
Browse latest View live