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

Answered: Will the Rebex File Server also support FTP and FTP/SSL? And when?

$
0
0

We do plan to eventually add FTP and FTP/SSL support to Rebex File Server, but we don't have a specific timeframe yet.

Rebex File Server is a new component and we are currently gathering user feedback and deciding on its future directions. In the near-term, we plan to add FileUploaded/FileDownloaded events, support for SSH tunneling, and virtual filesystems. When we are done with these features, adding FTP and FTP/SSL will most likely become the next step in Rebex File Server evolution.


Answered: i want to send e-mail using iso-2022-jp encoding

$
0
0

Hello from Prague to Japan and thank you for trying Rebex Secure Mail for your japanese c# email needs!

The transfer encoding of the other headers (including Subject) is automatically determined by the Rebex Secure Mail component.

Actually, the component chose QuotedPrintable encoding because the result was shorter ("=1B$B$3$l$O%F%9%H%a!=3C%k$G$9=1B=28B") than the Base64 encoded form ("GyRCJDMkbCRPJUYlOSVIJWEhPCVrJEckORsoQg==").

Do you think that it would be more suitable for Japanese emails to use base64 encoding for the headers and why?
If yes, please let us know and we could change the behavior of Rebex Secure Mail to automatically handle this.

P.S. actually, neither the MimeMessage.ContentTransferEncoding nor MimeMessage.TransferEncoding sets the transfer encoding of the headers like Subject, From, etc. In fact these properties only affect the email body. And it is useless to set both of them becuase both translate into the same "Content-Transfer-Encoding" header in the resulting MIME message.

How to resolve a problem retrying to upload file that failed due to a timeout.

$
0
0

I have downloaded a trial of Regex and used it to build an application that runs on Windows CE 5.0.

My code tries to upload a file using ftp.PutFile(localFilename, remoteFilename) and it failed with this exception: Rebex.Net.FtpException: Timeout exceeded.

(We think the failure was because we only has "one bar".)

My code disconnects from and destroys the first FTP session, creates and connects to a new FTP session, and tries to upload again. But this time it fails with the exception : Rebex.Net.FtpException: The process cannot access the file because it is being used by another process (550).

Am I forgetting to do something when the PutFile() fails?

Can anyone offer any insight?

How to create mail message draft

$
0
0

I'd like to create a mail message file (.MSG or .EML) to be opened in e-mail client (e.g. in Outlook). When an user opens the file, he/she can just fill the recipient's address and send the prepared message.

Unfortunately, the message files created using the MailMessage.Save method seems to be read-only (I cannot modify neither the recipient nor the message body}. I can only reply or forward the message.

Using SQL to store users for SFTP Server

$
0
0

Can I use SQL to store users credentials ?

Thanks

Answered: Open FTPS and SFTP servers for Testing our code and connectivity

$
0
0

You can find a list of public SFTP servers with free access on SFTP.net website. All of them are read-only.

For read-write access using your own SFTP server would be needed. SFTP.net includes also list of SFTP servers (mostly) for Windows.

But don't be afraid. Two of listed servers are quite minimalistic - Rebex Tiny SFTP server requires no installation at all. Just unpack the ZIP, run the application and push the start button. You can even download server C# source code if you want to modify it for your testing.

Core Free Mini SFTP server setup is also pretty easy. For Core Free Mini server download scroll down to the middle of page. On the top there are downloads for their full-featured server.

Answered: How to resolve a problem retrying to upload file that failed due to a timeout.

$
0
0

"The process cannot access the file because it is being used by
another process (550)."

error actually comes from the FTP server and Rebex FTP client just reports it.

So according to your description it looks as though the server has the remote file still locked from the first PutFile attempt, even though you already perform the second attempt to upload the file. It might be that the server is not even aware that the first sessions has already timed out... The server still holds the lock on the file and your second attempt fails subsequently.

Luckily enough, you can work around the server problem by uploading your file under a temporary filename (e.g. "remoteFilename.tmp{attemptNumber} or any other temp filename that suits your needs") and only after the ftp.PutFile method succeeds then rename the temporary file to the desired filename using the ftp.Rename method as in the code below:

Ftp ftp = new Ftp();
ftp.Connect("server");
ftp.Login("user", "password");

string localFileName = "C:\\file.txt";
    string remoteFileName = "file.txt";

try
{
    // first try:
    string remoteTempFile1 = remoteFileName + ".tmp" + 1;
    ftp.PutFile(localFileName, remoteTempFile1);
    ftp.Rename(remoteTempFile1, remoteFileName);
    }
catch (FtpException ex)
{
    if (ex.Status == FtpExceptionStatus.Timeout)
    {

        // reconnect 
        Ftp ftp = new Ftp();
        ftp.Connect("server");
        ftp.Login("user", "password");

        // second retry in case of timeout 
        string remoteTempFile2 = remoteFileName + ".tmp" + 2;
        ftp.PutFile(localFileName, remoteTempFile2);
        ftp.Rename(remoteTempFile2, remoteFileName);
    }
}

Give it a try and let me know whether it solved this issue.

FTP.GetItems Returns FTPItemCollection with no Items in Collection when there are Directories and Files on Server

$
0
0

My Employer migrated to a new FTP Server using the GlobalScape FTP Server product last week. My Windows Service that had been working with a GlobalScape FTP Server on the old server, could not download any files on the new server, even though files exist. FTP.GetItems.Count always returned 0.

So I tried using your WinForm Sample Client application. I got the same results. I set the Logging Level to Verbose and connected successfully. I can see the Directory names and Filenames listed in the logging window, but none of the Directory names or Filenames are listed in the left hand that should show the FTP files/directory names. The Verbose log does not show any errors or weird messages that I can see. What should I be looking for or asking my Corp IT to change/set for the FTP Server.

I can use the FileZilla FTP Client and see files and browse directories successfully.


Answered: FTP.GetItems Returns FTPItemCollection with no Items in Collection when there are Directories and Files on Server

$
0
0

This is caused by a bug in GlobalScape FTP Server's OPTS MLST command implementation - when the client requests specific facts to be sent in respnse to MLST/MLSD commands, GlobalScale EFT Server 7.1.x resets its fact list instead and only sends a file names in response to all subsequence MLST/MLSD commands. Interestingly, this bug was not present in older versions of GlobalScape servers.

This issue was recently discovered by one of our clients. I have already reported it to GlobalScape, but got no response so far. Hopefully, they will fix this soon.

In any case, the next release of Rebex FTP/SSL will feature an automated workaround for this server bug. In the meantime, download a trial hotfix (I sent a link to the full version to your e-mail.)

Users with active support contract, please send us an email to support@rebex.net and we'll send you a full hotfix version.

ftp.GetList() method is not returned soft links items which is created on Linux server.

$
0
0

ftp.GetList() method is not returned soft links items which is created on Linux server.

i have 2 types links in Linux server one is soft link and one is hard link.

hard links are getting but soft links are not getting.
any way to get it.

Two types of links

There are two types of links

symbolic links: Refer to a symbolic path indicating the abstract
location of another file hard links : Refer to the specific location
of physical data. How do I create soft link / symbolic link?

To create a symbolic link in Unix or Linux, at the shell prompt, enter
the following command: ln -s {target-filename} {symbolic-filename}

Log:
2015-06-30 19:18:04.964 Opening log file.
2015-06-30 19:18:05.084 INFO Ftp(1)[9] Info: Connecting to 192.168.1.132:365 using Ftp 4.0.4700.0.
2015-06-30 19:18:05.085 INFO Ftp(1)[9] Info: Using proxy none.
2015-06-30 19:18:05.273 DEBUG Ftp(1)[9] Info: Connection succeeded.
2015-06-30 19:18:05.280 INFO Ftp(1)[9] Response: 220 Vhost server
2015-06-30 19:18:05.289 INFO Ftp(1)[9] Command: USER test1234
2015-06-30 19:18:05.290 INFO Ftp(1)[9] Response: 331 Anonymous login ok, send your complete email address as your password
2015-06-30 19:18:05.290 INFO Ftp(1)[9] Command: PASS ********
2015-06-30 19:18:05.294 INFO Ftp(1)[9] Response: 230 Anonymous access granted, restrictions apply
2015-06-30 19:18:05.294 INFO Ftp(1)[9] Command: FEAT
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: 211-Features:
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: SIZE
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: LANG en-US.UTF-8;en-US*
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: SITE MKDIR
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: MFF modify;UNIX.group;UNIX.mode;
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: REST STREAM
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: MLST modify;perm;size;type;unique;UNIX.group;UNIX.mode;UNIX.owner;
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: UTF8
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: EPRT
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: SITE SYMLINK
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: EPSV
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: SITE UTIME
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: MDTM
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: SITE RMDIR
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: TVFS
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: SITE COPY
2015-06-30 19:18:05.295 INFO Ftp(1)[9] Response: MFMT
2015-06-30 19:18:05.296 INFO Ftp(1)[9] Response: 211 End
2015-06-30 19:18:05.313 INFO Ftp(1)[9] Command: OPTS UTF8 ON
2015-06-30 19:18:05.315 INFO Ftp(1)[9] Response: 200 UTF8 set to on
2015-06-30 19:18:05.316 INFO Ftp(1)[9] Command: CWD a
2015-06-30 19:18:05.318 INFO Ftp(1)[9] Response: 250-Please upload first!
2015-06-30 19:18:05.318 INFO Ftp(1)[9] Response: 250 CWD command successful
2015-06-30 19:18:05.329 DEBUG Ftp(1)[9] Info: Starting data transfer.
2015-06-30 19:18:05.329 INFO Ftp(1)[9] Command: TYPE A
2015-06-30 19:18:05.329 INFO Ftp(1)[9] Response: 200 Type set to A
2015-06-30 19:18:05.332 INFO Ftp(1)[9] Command: PASV
2015-06-30 19:18:05.333 INFO Ftp(1)[9] Response: 227 Entering Passive Mode (192,168,1,132,253,77).
2015-06-30 19:18:05.336 DEBUG Ftp(1)[9] Info: Establishing data connection to 192.168.1.132:64845.
2015-06-30 19:18:05.338 INFO Ftp(1)[9] Command: MLSD
2015-06-30 19:18:05.340 INFO Ftp(1)[9] Response: 150 Opening ASCII mode data connection for MLSD
2015-06-30 19:18:05.342 DEBUG Ftp(1)[9] Info: Item: modify=20150629140028;perm=adfr;size=28;type=file;unique=802U6E00FD;UNIX.group=1000;UNIX.mode=0664;UNIX.owner=1000; 1hard~
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150630134114;perm=flcdmpe;type=pdir;unique=802U6E0002;UNIX.group=1000;UNIX.mode=0777;UNIX.owner=1000; ..
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150629140028;perm=adfr;size=71;type=file;unique=802U6E1C4D;UNIX.group=1000;UNIX.mode=0664;UNIX.owner=1000; 1
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150629141332;perm=adfr;size=1;type=OS.unix=symlink;unique=802U6E1C4D;UNIX.group=1000;UNIX.mode=0777;UNIX.owner=1000; 1soft
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150629135906;perm=adfr;size=0;type=file;unique=802U6E0105;UNIX.group=1000;UNIX.mode=0664;UNIX.owner=1000; 1~
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150630045704;perm=fle;type=cdir;unique=802U6E1C50;UNIX.group=1000;UNIX.mode=0775;UNIX.owner=1000; .
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150630045704;perm=adfr;size=1;type=OS.unix=symlink;unique=802U6E1C4D;UNIX.group=1000;UNIX.mode=0777;UNIX.owner=1000; 2soft
2015-06-30 19:18:05.369 DEBUG Ftp(1)[9] Info: Item: modify=20150629140028;perm=adfr;size=71;type=file;unique=802U6E1C4D;UNIX.group=1000;UNIX.mode=0664;UNIX.owner=1000; 1hard
2015-06-30 19:18:05.370 DEBUG Ftp(1)[9] Info: Data transfer ended. 976 bytes transferred.
2015-06-30 19:18:05.371 DEBUG Ftp(1)[9] Info: Closing downloading data connection.
2015-06-30 19:18:05.375 DEBUG Ftp(1)[9] Info: Waiting for data transfer ending message.
2015-06-30 19:18:05.375 INFO Ftp(1)[9] Response: 226 Transfer complete
2015-06-30 19:18:05.375 DEBUG Ftp(1)[9] Info: Data transfer ended.
2015-06-30 19:18:05.375 DEBUG Ftp(1)[9] Info: Transfer ended successfully.
2015-06-30 19:18:05.376 DEBUG Ftp(1)[9] Info: Data connection closed.

Code :

Ftp ftp = new Ftp();
ftp.LogWriter=new FileLogWriter("D:\\temp.txt",LogLevel.Debug);

ftp.Connect("192.168.1.132",365);

ftp.Login("test1234", "test1234");
ftp.ChangeDirectory("a");
var ftpItemCollection = ftp.GetList();

total 5 item in folder 1 normal file(text file name- 1) 1 hard link file to normal (name -1hard) 2 soft link items(names- 1soft 2soft) create using cmd 1 using linux context menu(name- link to 1)

but method returns following item(type of all item is file)

1hard~ 1~
1 1hard

ftp.FileExists() returns false when file is present in server.

$
0
0

ftp.FileExists() returns false when file is present in server.

for following server and scenario like
if i provide full path it returns false
root="/"
file name="!Infoonfilesfound_here.txt"

Ftp ftp = new Ftp();
ftp.Connect("ftp.de.4d.com");    
ftp.Login("username", "password"); 

if (ftp.FileExists("/!_Info_on_files_found_here.txt"))
   Console.WriteLine("FileExists");
else
   Console.WriteLine("File not exists");// return false

and if i provide like this

 if (ftp.FileExists("!_Info_on_files_found_here.txt"))
       Console.WriteLine("FileExists");// return true
    else
       Console.WriteLine("File not exists");

for other server it takes full path and returns correct

same thing happen with GetFileLength() method.

log :
2015-06-30 17:23:16.353 Opening log file.
2015-06-30 17:23:16.473 INFO Ftp(1)[9] Info: Connecting to ftp.de.4d.com:21 using Ftp 4.0.4700.0.
2015-06-30 17:23:16.473 INFO Ftp(1)[9] Info: Using proxy none.
2015-06-30 17:23:20.185 INFO Ftp(1)[9] Response: 220 ftp.4d.com FTP server ready.
2015-06-30 17:23:20.195 INFO Ftp(1)[9] Command: USER username
2015-06-30 17:23:20.456 INFO Ftp(1)[9] Response: 331 Guest login ok, send your complete e-mail address as password.
2015-06-30 17:23:20.458 INFO Ftp(1)[9] Command: PASS *********
2015-06-30 17:23:20.735 INFO Ftp(1)[9] Response: 230-The response 'anonymous' is not valid
2015-06-30 17:23:20.735 INFO Ftp(1)[9] Response: 230-Next time please use your e-mail address as your password
2015-06-30 17:23:20.752 INFO Ftp(1)[9] Response: 230- for example: joe@188-54-87-183.mysipl.com
2015-06-30 17:23:20.752 INFO Ftp(1)[9] Response: 230 Guest login ok, access restrictions apply.
2015-06-30 17:23:20.755 INFO Ftp(1)[9] Command: FEAT
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: 211-Supported features:
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: REST STREAM
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: ADAT
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: AUTH
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: CCC
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: CONF
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: ENC
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: MIC
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: PBSZ
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: PROT
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: MDTM
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: UTF8
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: SIZE
2015-06-30 17:23:21.028 INFO Ftp(1)[9] Response: 211 End
2015-06-30 17:23:21.062 INFO Ftp(1)[9] Command: OPTS UTF8 ON
2015-06-30 17:23:21.339 INFO Ftp(1)[9] Response: 200 UTF-8 encoding enabled
2015-06-30 17:23:21.346 INFO Ftp(1)[9] Command: TYPE I
2015-06-30 17:23:21.611 INFO Ftp(1)[9] Response: 200 Type set to I.
2015-06-30 17:23:21.612 INFO Ftp(1)[9] Command: SIZE .
2015-06-30 17:23:21.873 INFO Ftp(1)[9] Response: 550 .: not a plain file.
2015-06-30 17:23:21.873 INFO Ftp(1)[9] Command: SIZE /!Infoonfilesfoundhere.txt
2015-06-30 17:23:22.150 INFO Ftp(1)[9] Response: 550 /!
Infoonfilesfoundhere.txt: not a plain file.

any suggestion
thanks

Cannot connect and ECONNREFUSED error message

$
0
0

We are using a FTPS server from www.adrive.com. Rebex can connect to it most of the time but every now and then it fails. I used FileZilla to connect to the same server and it logged this (I have added some XXX parts to hide some details).

Status: Resolving address of ftp.xxx.co
Status: Connecting to 65.49.XX.56:21...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server", trying next address.
Status: Connecting to 65.49.XX.57:21...
Status: Connection established, waiting for welcome message...
Response:   220 ADrive.com - Username is your email address used for web interface. FTP is for Signature and Premium accounts only.

It looks like it got the IP address from the DNS (65.49.XX.56) but it failed to connect to this server, so it moved on to the next.

When using Rebex, it tries to connect to 65.49.XX.56 and fails, but doesn't move on to the next address. If I hard code the 65.49.XX.57 address then it connects okay.

I'm not sure what www.adrive.com are doing or if Rebex should be able to cope.

Any ideas?
Thanks.

Answered: Setting custom EHLO or HELO domain

$
0
0

I found that if I just set the following Gmail will accept:

smtp.ClientDomain = "domain.you.are.relaying.for";

Gmail will accept it. Thanks!

Answered: What controls on iphone can extend the Iscreen or Iterminal interface.

$
0
0

According to Xamarin Forms custom renderer documentation, custom renderers make it possible to develop custom Xamarin.Forms UI elements based on native objects of each supported platform.

This means that in order to write a Xamarin.Forms equivalent to our TerminalControl object, one would first have to implement a terminal control using native SDK features of each of the supported platforms, and then write a custom renderer for it to make it work as a Xamarin.Forms UI element.

An iOS terminal control would consist of an IScreen implementation that draws into an UIView. We will try looking into this and will hopefully release some sample code for it soon.

Answered: EMail Returned as Attachment on MailMessage

$
0
0

Thank you for sending us the problematic EML file.

I tested loading the original email into the MailMessage class and actually I was unable to reproduce the problem that you described.

With the code below:

MailMessage mail = new MailMessage ();
mail.Load ("email.eml");

Console.WriteLine (mail.HasBodyText);
Console.WriteLine (mail.Attachments.Count);
    Console.WriteLine (mail.BodyText);

mail.Save("email-resaved.eml");

the email parses just correctly. The HasBodyText property is set to 'true' and the Attachments.Count is "1" as it should be (only the pdf was parsed as attachment). I do not see the ATT00001.txt attachment popping is as you described.

Could you please try to download the email with the latest version of Rebex Secure Mail (e.g. 2015R4.1)? If you still experience the issue with the newest version, please send us a code repro so that we are able to reproduce this issue.


How to find servers are FXP support or not Support ?

$
0
0

How to find servers are FXP support or not Support ?

Is there any command, any function in Rebex.ftp, any workaround?

Answered: Rebex.Net.Sftp - Key exchange failed, Unable to acquire context

Answered: Is there a way to emulate the P1 function key in the terminal emulation?

$
0
0

Hi,

Keys that are not letters or numbers almost always send some code string (mostly in form of escape sequence) to the server. You need to know which escape sequence is send to the server when the mapped key (in your case NumLock) is pressed.

According to this article, it seems you want to send PF1 key, which is SS3 P (ESC O P) escape sequence, which is the same as F1 function key with default options set in our terminal.

So, to send PF1 key (SS3 P), just press F1 key on Windows keyboard.

Alternatively, you can send the escape sequence to the server programmaticaly by calling:

terminal.Scripting.Send(FunctionKey.F1);

If it does not help, please let us know.

Do we have any event to notify that ftp is free for operations.

$
0
0

I have a situation where i need to automatically upload files. if ftp is busy then i am adding upload requests in a queue otherwise i am directly uploading files. now i need an event which notifies that ftp is free to upload items in my upload queue.

Currently i am using statechanged event but it is not too reliable because whenever ftp.state changes to Ready state, ftp.IsBusy property does not get set to false.

if i try to upload file when ftp state changes to ready state, it throws another operation pending exception because ftp is still busy.

Is there any workaround to handle this situation ?

Answered: IPV6 connection problem

$
0
0

Hello,

IPv6 is supported by Rebex FTP client. At the moment Rebex FTP prefers IPv4 addresses and only uses IPv6 address if no IPv4 address is available for a hotname.

I prepared a code that tries to connect to the first IPv6 address available and it reports that there are actually no IPv6 addresses for the "ftp.ripe.net" FTP server.

        IPHostEntry ipEntry = Dns.GetHostEntry("ftp.ripe.net");
        IPAddress[] addresses = ipEntry.AddressList;

        IPAddress ipv6 = null;
        foreach (var address in addresses)
        {
            if (address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)
            {
                ipv6 = address;
                break;
            }
        }

        if (ipv6 == null)
            throw new ApplicationException("No IPv6 address");

        Ftp ftp = new Ftp();
        ftp.Connect(ipv6.ToString());

Running the code, are you sure there is an IPv6 address for your FTP server?

Viewing all 3874 articles
Browse latest View live