using Rebex.Net;

Welcome to using Rebex.Net; Sign in | Help
in Search

Using Rebex.Net

News and announcements about Rebex.NET components

  • Build 4086: Better .MSG support in Rebex Mail, faster decompression in Rebex ZIP, bugfixes in SFTP & SSH Shell

    Better Oulook .MSG support in Rebex Mail

    Outlook .MSG support introduced in the previous version seems to be working fine overall, but our customers found one compatilibity issue we missed: If you drag&drop a .MSG file created by Rebex Mail to Outlook, everything looks fine at first, but the message disappears in a few minutes. To our big surprise, we discovered this is caused by uncompressed RTF data present in .MSG files written by Rebex Mail. Adding compression solved the issue.

    Enhanced scripting support in VirtualTerminal class (Rebex SSH Shell and Rebex Telnet)

    Lot of our users attempt to use the Shell class to reproduce Expect-like functionality. The problem with this is that the class was not meant to be used this way and its API is designed to run simple shell commands, not complex scripts. For that VirtualTerminal class is much better suited and should be preferred whenever possible. Check out the following Q&A forum post for inspiration: How to use VirtualTerminal.Expect method.

    Bugfixes in SSH core

    Unforunately, a bugfix for a race condition in our SSH core we released three weeks ago turned out to contain two new bugs leading to bogus timeout exceptions. All users currently using build 4060 of Rebex SFTP or Rebex SSH Shell are strongly advised to upgrade to build 4087 which solves this issue. We are sorry for any inconvenience this might hae caused!

    Complete list of changes:

    • FTP: Missing end-of-data blocks in are ignored in MODE Z transfers (some FTP servers failed to send them).
    • FTP: GetList, GetRawList and GetNameList methods with empty arguments now behave like their parameter-less variants.
    • SSH Core: Added workaround for old SSH servers that miscalulate HMAC-SHA1 keys.
    • SSH Core: Added SshParameters.AuthenticationMethods to make it possible to only enable desired authentication methods.
    • SSH Core: SendEof method added to SshChannel to make it possible to achieve plink-like functionality.
    • SSH Core: Fixed a bug in SSH channel window size adjustment code which could cause a timeout on servers which send oversized packets.
    • SSH Core: Fixed a bug that prevented SSH key renegotiation requests from being processed, resulting in a timeout.
    • SSH Core: Abort flag checking messages removed from Debug log.
    • MSG: RTF data written into .MSG messages is compressed using LZFu. This enhances Outlook compatibility (drag&dropped messages no longer disappear).
    • MSG: Added MimeOptions.LoadMsgProperties option to make it possible to load some .MSG-only properties not accessible otherwise.
    • SMTP/SSL: Security (SmtpSecurity) and Parameters (TlsParameters) properties added to SmtpConfiguration.
    • Terminal: HistoryMaxLength property added to TerminalControl.
    • Terminal: Added regular-expression-based VirtualTerminal.Expect method.
    • Terminal: Prompt doesn't have to be set when a question prompt is specified in a ReadLine/ReadAll call.
    • Terminal: Shell class in ShellMode.Prompt works with *BSD now.
    • Terminal: VirtualTerminal.Expect behaves the same way no matter whether expected string comes at an end of a block of data or not and always stops at the first occurance.
    • Terminal: VirtualTerminal.DataReceived property added to make it possible to easily retrieve data received by Expect and Process methods.
    • ZIP: Faster decompression!
    • ZIP: Exceptions thrown by ZipArchive.ProblemDetected event no longer cause unhandled exception and terminate the application.

  • New component: Rebex ZIP for .NET Compact Framework

    rebex-zipWe have just released a .NET Compact Framework edition of Rebex ZIP, our ZIP, UnZIP, Deflate and ZLib compression component.

    With the CF version, you can use all the features of Rebex ZIP on Windows Mobile (Pocket PC) and Windows CE devices. Samples in C# and VB.NET are available.

    Of course, the Compact Framework version of Rebex ZIP was added to Rebex Total Pack as well, so if you already have an active subscription, you can download it immediately. For information about upgrading, please contact us!

    See also: ZIP component homepage | Download trial | Pricing from $349

  • Build 4060: Outlook .MSG format support in Rebex Mail, bandwidth throttling in Rebex SFTP

    Outlook .MSG format support in Rebex Mail

    Writing this from scratch took a lot of time, but it was definitely worth it. With the new release of Rebex Mail and Rebex Secure Mail, the MailMessage class can load and save Outlook .MSG format files! You might not even have to change your application to add support for loading .MSG files because they are detected and parsed automatically.

    Bandwidth throttling in SFTP

    Rebex FTP and FTP/SSL components already got bandwidth throttling few years ago. Now it's available in Rebex SFTP as well and it's just as easy to use - just check out Sftp's new MaxUploadSpeed and MaxDownloadSpeed properties and the new WinFormClient sample.

    BytesTotal and ProgressPercentage properties in transfer progress events

    Implementing a file transfer progress bar is now even easier than before due to new BytesTotal and ProgressPercentage properties which were added to TransferProgress event arguments in both Rebex FTP/SSL and Rebex SFTP.

    Complete list of changes:
    • FTP: BytesTotal and ProgressPercentage properties added to Ftp.TransferProgress event arguments.
    • FTP: Group, Owner and Permissions properties added to FtpItem class.
    • FTP: Added support for Transnet FTP Gateway's list format.
    • FTP: Added a new overload for the Login method that accepts account in addition to username and password.
    • FTP: Added FtpOptions.ForceListHiddenFiles option to force using "LIST -la" instead of "LIST" command to retrieve file and directory listings.
    • FTP: Fixed a bug that caused a list parser to failed for symlinks with missing target path.
    • FTP: Added support for Tandem Guardian FTP server list format.
    • FTP: FtpItemComparer class added to ease sorting of FtpList items.
    • FTP: Enabling FtpOptions.EnableControlConnectionFlushing option doesn't cause a noticable slowdown now.
    • FTP: Ftp.PutFiles method (in ThrowExceptionOnLinks mode) correctly detects the links in Windows 7 which were not detected previously.
    • FTP: Added a workaround for servers that advertise MLST support but report a "Can't check for file existence" error later.
    • FTP: Ftp.IsAuthenticated property added to make it easily possible to skip calling Ftp.Login method for users already authenticated using a certificate.
    • FTP: Fixed a bug in ZLIB decompression routines.
    • FTP: Fixed improper TLS/SSL session reusing. FtpOptions.FtpReuseControlConnectionSession option added to make it possible to re-use the control connection session for subsequent data connections as well.
    • FTP: Support for IBM AS/400 FTP listing format added.
    • FTP: Added workaround for FTP servers which don't properly end the ZLIB stream when MODE Z is used.
    • SFTP: Bandwidth throttling support through Sftp object's MaxUploadSpeed/MaxDownloadSpeed properties.
    • SFTP: BytesTotal and ProgressPercentage properties added to Sftp.TransferProgress event arguments.
    • SFTP: SetFileDateTime in SFTP v4 is now compatible with WS_FTP.
    • SFTP: Sftp object's AbortTransfer method now properly cancels operations that are just about to start as well.
    • SFTP: Added SftpItemComparer class to ease sorting of SftpItemCollection items.
    • SFTP: Added workarounds to Sftp.GetStream method SFTP servers that don't support the Append mode.
    • SFTP: Added workarounds for several SFTP servers where SSH_FXP_STAT and SSH_FXP_REALPATH commands (used by many Rebex SFTP methods) don't always work (for aliased directories, for example).
    • SFTP: Sftp.PutFiles method (in ThrowExceptionOnLinks mode) correctly detects the links in Windows 7 which were not detected previously.
    • SFTP: Added a workaround for SFTP server that sent duplicate filenames in their listings.
    • SCP: GetFiles and PutFiles methods added to Scp object to make it possible to transfer multiple files or a whole directory tree in one call.
    • IMAP: ImapMessageCollection.Remove method added.
    • IMAP: ImapSearchParameter.Arrived now accepts DateTime.MinValue as "since" argument.
    • IMAP: Added ImapMessageInfoComparer and ImapMessageCollection.Sort method to ease sorting of message info items.
    • IMAP: The default value of Imap.Encoding is now selected according to the current locale.
    • IMAP: ContentId property added to ImapMessagePart object.
    • MIME: Load and save support for MS Outlook .MSG format added to MailMessage class.
    • MIME: Fixed a bug that caused a failure when trying to verify a signature of a MailMessage with Sender header present.
    • MIME: Messages with signature broken by WatchGuard Firebox are loaded fine now (although the signature is not usable any more).
    • MIME: Automated PKCS#7 S/MIME blob detection for unknown "smime-type" values in Content-Type header.
    • MIME: Added a workaround for Content-type arguments with missing quotes.
    • MIME: Fixed a bug in mail message tree reader that sometimes caused bodies to be treated as attachments.
    • MIME: Fixed an issue in MimeParameterList.Encode method that caused a bad format to be encoded when used separately.
    • MIME: Improved exception messages for some header parsing errors.
    • POP3: Added Pop3MessageInfoComparer class and Pop3MessageCollection.Sort method to ease sorting of message info items.
    • POP3: Fixed bug in Pop3.Abort method that caused its call to be ignored during very fast transfers.
    • POP3: Added Pop3Options.IgnoreInvalidEndings option to make it possible to ignore invalid endings in message data sent by some broken POP3 servers.
    • POP3: Added workaround for Gmail's POP3 service which makes retrieved messages invisible next time.
    • POP3: Added Pop3.GetMessageSequenceNumber method which converts a unique ID to sequence number.
    • ZIP: .NET Compact Framework edition of Rebex ZIP now available.
    • ZIP: GzipCompressionStream and GzipDecompressionStream objects added.
    • ZIP: Added an option (ZipOptions.SkipItemsWhichCannotExtract) to skip items we can't extract in ZipArchive.Extract method.
    • ZIP: Fixed a bug in ZLIB decompression routines.
    • ZIP: Added ZipArchive.ForceManagedAes flag as a workaround to .NET's leaking AesCryptoServiceProvider.
    • ZIP: ZipArchive.Add method (in ThrowExceptionOnLinks mode) correctly detects the links in Windows 7 which were not detected previously.
    • ZIP: Zip64 is no longer used for data added from Stream by default due to compatibility issues (with Windows XP, for example). ZipArchive.Options.Zip64Mode property added to make the behavior configurable.
    • Terminal: During Select Character Set control sequence, character set is immediately invoked into GL.
    • Terminal: Added support for Pick terminals.
    • Terminal: Added ActionRequested event to TerminalControl and VirtualTerminal objects to make it possible to handle action requests from the server.
    • Terminal: CursorText and CursorMouse properties added to TerminalControl object.
    • SSH Core: AuthenticationRequest event added to make it possible to deal with all kinds of "keyboard-interactive" authentication prompts.
    • SSH Core: Fixed a possible race condition that might have occured when using the same SshSession intance from multiple threads.
    • SSH Core: Enhanced automated "keyboard-interactive" authentication to support more variants of password prompt.
    • SSH Core: Fixed a bug in ZLIB decompression routines.
    • SSH Core: SshSession.Encoding property added.
    • SSH Core: Added SshOptions.WaitForServerWelcomeMessage option.
    • ProxySocket: Added a new ILogWriter implementation that logs all messages to .NET's System.Diagnostics.Trace.
    • Security: Added a new overload of SshPrivateKey.Save to make it possible to save keys in SSLEay/OpenSSH format (in addition to PuTTY .ppk and PKCS #8 formats).
    • Security: Added CertificateChain.Save method to save the chain in .p7b format.
    • Security: Fixed a bug in DistinguishedName object that caused the elementes of string representation of DNs to be reversed.
    • Security: Added CryptoHelper.ForceManagedAes flag as a workaround to .NET's leaking AesCryptoServiceProvider.
  • How to upload data to FTP server from SQL-CLR procedure

    Since Microsoft SQL Server 2005, stored procedures (and some other database objects) can be written externally in some .NET language, imported to the SQL database and called as stored procedures. The following sample demonstrates how to call Rebex FTP component from the T-SQL code.

    Methods of Rebex FTP API cannot be accessed from T-SQL directly because only static methods can be mapped to stored procedures. Because Rebex FTP API is not based on static methods, a wrapper class should be created to call Rebex FTP API.

    NOTE: the following example considers using of “Rebex FTP for .NET” component in MS SQL Server 2008 and using MS Visual Studio 2008.
    UPDATE: you cannot put the "Rebex FTP for .NET CF" libraries (as well as any other "CF" libraries) into MS SQL Server.

    Configure SQL Server and the database for CLR

    Some of these initial steps can be skipped if the environment is already configured.

    Enable CLR in the SQL Server

    USE master

    GO

     

    sp_configure 'clr enabled', 1

    GO

     

    RECONFIGURE

    GO

    Create a sample database

    CREATE DATABASE Test

    GO

    Make the database trustworthy to allow access external resources

    USE Test

    GO

    ALTER DATABASE Test SET TRUSTWORTHY ON

    GO

    Import the Rebex assemblies into the database

    CREATE ASSEMBLY [Rebex.Net.Ftp]

     -- replace with your path to the Rebex.Net.Ftp.dll:

     FROM 'c:\Program Files (x86)\Rebex\FTP for .NET 2.0 Trial\bin\Rebex.Net.Ftp.dll'

     -- "UNSAFE" permission set is needed to allow network communication

     WITH PERMISSION_SET = UNSAFE;

     

    Note that importing of the Rebex.Net.Ftp assembly also imports all other assemblies the primary assembly depends on.
    In our case, a Rebex.Net.ProxySockets assembly is automatically loaded.

    You should see that two assemblies in the SQL Server Management Studio:

    image

    Write a wrapper class in Visual Studio 2008

    Create a SQL Server Project in Visual Studio

    Create new VS project of type “SQL Server Project” (located in the “database” section):

    image

    After creating the project, you will be prompted to add a database reference.
    Specify connection to the database where the Rebex assemblies were imported in the previous step.

    Add reference to the Rebex assemblies

    In the Visual Studio project References click on the “Add Reference”.
    The following dialog should appear:

    image

    Select “Rebex.Net.Ftp” and “Rebex.Net.ProxySocket” assemblies and click OK.

    NOTE: the list of assemblies is retrieved from the assemblies registered in the SQL Server Database (defined in the previous step), they can not retrieved from filesystem or GAC. The assemblies in the SQL server work in the separate subset of .NET framework and cannot see any assemblies outside.

    Create a new method for the .NET code of the stored procedure

    Add a new project file “FtpUploadText.cs” with type “Stored Procedure”:

    image

    NOTE: the Visual Studio SqlServerProject stores all procedures to the one big partial class – each method into separate .cs file.

    Implement body the stored procedure method

    Let’s create a following sample method that receives a string and writes it into a text file on the FTP server:

    using System;

    using Microsoft.SqlServer.Server;

    using Rebex.Net;

     

    public partial class StoredProcedures

    {

        /// <summary>

        /// Upload a text to the file on FTP server.

        /// </summary>

        /// <param name="ftpHost">Hostname of the FTP server.</param>

        /// <param name="username">FTP user name.</param>

        /// <param name="password">FTP user password.</param>

        /// <param name="remotePath">FTP path of the target file.</param>

        /// <param name="content">String that will be stored into the target file.</param>

        [SqlProcedure]

        public static void FtpUploadText(string ftpHost, string username, string password, string remotePath, string content)

        {

            // create client, connect and log in

            Ftp client = new Ftp();

            client.Connect(ftpHost);

            client.Login(username, password);

     

            // upload a text using a MemoryStream

            byte[] data = System.Text.Encoding.Default.GetBytes(content);

            System.IO.MemoryStream ms = new System.IO.MemoryStream(data);

            client.PutFile(ms, remotePath);

     

            client.Disconnect();

        }

    };

    Build and deploy the stored procedure method

    Build the project and import the compiled assembly into the SQL Server Database using the following command:

    CREATE ASSEMBLY [MyClrCode]

     -- replace with your path to the compiled binaries

     FROM 'c:\projects\SqlServerProject1\SqlServerProject1\bin\Debug\SqlServerProject1.dll'

     -- "UNSAFE" permission set is needed to allow network communication

     WITH PERMISSION_SET = UNSAFE;

    NOTE: you can do the same by choosing “Deploy” right clicking on the project name in the Visual Studio.

    In that case, don’t forget to set the “Permission level = Unsafe” in the project properties.

    Create and use the stored procedure

    Map the CLR method to the T-SQL stored procedure

    To call the method from the T-SQL, you should create a stored procedure envelope like this:

    CREATE PROCEDURE FtpUploadText

    (

        @host NVarchar(1000),

        @username NVarchar(100),

        @password NVarchar(100),

        @remotePath NVarchar(1000),

        @content NVarchar(max)               

    )

    AS

    EXTERNAL NAME [MyClrCode].[StoredProcedures].[FtpUploadText]

    GO

    Syntax of the EXTERNAL NAME phrase is:

    [MyClrCode] – name of the assembly (as the assembly has been imported to the SQL Server database)
    [StoredProcedures] – class name
    [FtpUploadText] – method name

    NOTE that the number and types of the stored procedure parameters should be the same as parameters of the method. Parameter names need not be the same.

    Execute the stored procedure

    The stored procedure can be executed as usual:

    EXEC FtpUploadText 'ftp.test.com', 'auser', 'thepassword', '/folder/file.txt', 'Hello world!'

  • How to choose between TLS/SSL Implicit and Explicit mode?

    What’s common for FTP, POP3, IMAP, SMTP, HTTP? All those protocols share same method for encryption of communication between client and server – the TLS/SSL. TLS is just a new name for SSL version 3.1 (for details see KB article about Secure FTP).

    The TLS/SSL comes in two common flavors:

    • TLS/SSL Explicit
    • TLS/SSL Implicit

    What’s the difference?

    Detailed description can be found at KB article about TLS/SSL implicit and explicit modes difference. Simplified explanation follows:

    TLS/SSL Explicit

    • Runs on the same port as plain (unencrypted) protocol.
    • Client must ask the server to switch the encryption on.

    TLS/SSL Implicit

    • Runs on a different port than plain (unencrypted) protocol.
    • Encryption is turned on automatically.

    How to choose which one to use?

    You may have received a hostname and port from you admin and you are wondering which version of TLS/SSL security should be used. A general rule of thumb seems to be simple:

    • If the port is the same as standard port for this protocol use the TLS/SSL Explicit
    • If the port is different use the TLS/SSL Implicit

    See following KB article for standard and TLS/SSL Explicit ports for FTP, POP3, IMAP, SMTP and HTTP.

    P.S. In addition to blogging, we are also using Twitter for quick updates and to share links. Follow us at: twitter.com/rebexnet

  • DevProConnections Awards: Vote for Your Favorite Rebex Product

    Rebex has been nominated in 4 categories in this year’s DevProConnections Comunity Choice Awards.

    Please visit: http://www.surveymonkey.com/s/DEVCommChoiceFinalVoting and cast your vote for your favorite Rebex products. Voting ends on September 21, 2010.

    image

    Our nominated products are as follows:

    • Communications Tool
      Rebex FTP for .NET
      Rebex SFTP
      Rebex File Transfer Pack
      Rebex Total Pack
    • Component Set
      Rebex Total Pack
    • E-mail Control
      Rebex Mail for .NET
    • Security Tool
      Rebex SFTP
      Rebex SSH Shell

     

    Thanks for your vote,

    Martin Vobr, founder
    www.rebex.net

  • Build 3854: Encryption in Rebex ZIP, FIPS-mode in Rebex FTP/SSL

    Encryption and other enhancements in Rebex ZIP

    We added all the important features that didn't make it into the first release of Rebex ZIP: AES encryption, stream-based access to compressed files, asynchronous methods, and more. Check out the list below for details. On top of that, a new explorer-like sample was added.

    FIPS 140-2 mode in FTP/SSL

    When using Rebex FTP on a machine where only certified FIPS 140-2 algorithms are allowed, a FIPS 140-2 mode is enabled and non-compliant algorithms are switched off. This mode can also be enabled manually by referencing Rebex.Security.dll and setting the Rebex.Security.Cryptography.CryptoHelper.UseFipsAlgorithmsOnly property to true. This was already available in Rebex SFTP before.

    New stream-based access to remote files in SFTP

    While there is nothing wrong with PutFile and GetFile methods, sometimes a stream-based access is required. We now added a new GetStream method that returns a stream representing a remote file - and all the stream features are supported, including seeking and setting file length. This makes it possible to (for example) use Rebex SFTP with Rebex ZIP to access a remote ZIP file and extract selected files from it without having to download the whole ZIP file.

    Complete list of changes:

    • FTP/SSL: Added FIPS 140-2 compliant mode that is automatically enabled on systems where only compliant algorithms are allowed.
    • FTP: Ftp class inherits from NetworkSession base class that implements some common properties.
    • FTP: Added a workaround for FTP servers with broken MLST output.
    • FTP: SITE command is no longer used to detect MS IIS FTP 7.x because it caused problems to some firewalls.
    • FTP: FtpList.GetEnumerator is now an implementation of IEnumerable<FtpItem>.
    • FTP: Better error handling in GetFiles/PutFiles methods.
    • SFTP: Added Sftp.GetStream method that makes it possible to open a readable/writable/seekable stream of a remote file.
    • SFTP: Added ProtocolVersion property to Sftp class.
    • SFTP: Added SftpOption.UseReadWriteModeForDownloads option.
    • SFTP: Sftp class inherits from NetworkSession base class that implements some common properties.
    • SFTP: SftpItemCollection.GetEnumerator is now an implementation of IEnumerable<SftpItem>.
    • SFTP: Fixed a DateTime range check in SftpAttributes.Modified and .Created which was performed before the conversion to UTC.
    • SFTP: Better error handling in GetFiles/PutFiles methods.
    • S/MIME: Added support for AES ecnryption (128, 192 and 256bit).
    • MIME: A more descriptive exception is thrown when attempting to save a mail message into a directory path instead of file path.
    • MIME: Changed routine for fixing invalid filenames, it no longer changes the '%' character.
    • MIME: Added a MimeOptions.DisableSinglePartHtmlWorkaround option to disable single-part HTML workaround in MailMessage.
    • MIME: Attachment, view and resource collections' GetEnumerator is now an implementation of IEnumerable<T>.
    • IMAP: ImapMessageCollection implements IEnumerable<ImapMessageInfo>.
    • IMAP: Imap class inherits from NetworkSession base class that implements some common properties.
    • SMTP: Smtp class inherits from NetworkSession base class that implements some common properties.
    • POP3: Pop3 class inherits from NetworkSession base class that implements some common properties.
    • POP3: Added a workaround for an old version of Lotus Domino that advertises APOP support but don't actually support it.
    • POP3: Pop3MessageCollection implements IEnumerable<Pop3MessageInfo>.
    • SSH Shell: Ssh class inherits from NetworkSession base class that implements some common properties.
    • Terminal: Added new SendToServer method overload to TerminalControl and VirtualTerminal that makes it possible to easily simulate function keys.
    • Terminal: New BreakSeqeuence option added to TerminalOptions.
    • SSH Core: In FIPS-only mode, a CryptoAPI implementation of AES is used if available.
    • SSH Core: Added support for aes*-ctr and 3des-ctr ciphers.
    • SSH Core: SshSession class inherits from NetworkSession base class that implements some common properties.
    • ZIP: Added a new overload for Extract, Add and Delete methods that accepts a list of files.
    • ZIP: Added ZipItem.Open() method that makes it possible to open a readable stream of a compressed file.
    • ZIP: Added a new Rebex.IO.Compression.Streams namespace with low-level compression/decompression classes (Deflate, Enhanced Deflate, ZLIB).
    • ZIP: Better error handling in AddFiles/ExtractFiles/ExtractAll methods.
    • ZIP: Fixed a bug in handling the Retry action if an error occured while retrieving hierarchy.
    • ZIP: Added support for password-based encryption using 256bit, 192bit, 128bit AES and ZIP 2.0.
    • ZIP: Added ShrinkProgress event to make it possible to display shrink progress.
    • ZIP: Asynchronous methods added to ZipArchive class: AddAsync, ExtractAsync, MoveAsync, DeleteAsync, SaveAsync.
    • ZIP: Added support for persisting and restoring last access and creation dates.
    • ZIP: Added a DeleteUnfinishedFileOnExtractError option to specify whether to delete or keep a file on extract error.

    Some of you already noticed Rebex DLLs in Visual Studio 2010's application folders. It's now official - we are proud to anounce that Microsoft is using Rebex FTP/SSL and SFTP in Microsoft Visual Studio 2010 and Microsoft Expression Web!

    If you would like to be informed about what's going on at Rebex, you are welcome to follow us on Twitter.

  • Microsoft is using Rebex FTP/SSL and SFTP in Microsoft Visual Studio 2010 and Microsoft Expression Web

    One of top 10 new features of Expression Web 3 was the ability to publish a website using FTPS (FTP/SSL) or SFTP.

    We are proud that Rebex has contributed to this feature by licensing Rebex FTP/SSL and Rebex SFTP components to Microsoft.

    These Rebex components are currently used in the following Microsoft applications:

    • Microsoft Expression Web 3
    • Microsoft Expression Web 4
    • Microsoft Visual Studio 2010

    We are proud that Microsoft chose us from all other vendors. Thanks!

    Licensing Q/A:

    Question: I am a user of Microsoft Visual Studio 2010 or Expression Web. I want to use a Rebex SFTP/FTP in my application too. Do I have to obtain a separate license for Rebex components?

    Answer: Yes. Each developer working with the component must have a developer's license. You may distribute Rebex DLLs with your app royalty free if you have purchased a license, but you cannot transfer the right to develop new applications with Rebex components to your customers.

  • Hotfix: FIPS 140-2 compliant mode added to FTP/SSL

    We have just released a hotfix for Rebex FTP/SSL that adds FIPS 140-2 compliant mode. It is automatically enabled on systems where only FIPS-compliant algorithms are allowed. This has already been available in Rebex SFTP. This hotfix is only needed when running Rebex FTP/SSL on a FIPS-only systems.

    If you have an active Rebex FTP/SSL, Rebex File Transfer Pack or Rebex Total Pack license, you can download the hotfix from the following URL:

    http://www.rebex.net/protected/hotfix-ftp-fips.aspx

  • New component: Rebex ZIP for .NET

    A new Rebex component has been released: Rebex ZIP for .NET.

    Rebex ZIP is a compression component for .NET languages (such as C# or VB.NET). It makes it easy to work with ZIP archive files from your application.

    Features include:

    • Easy to use API (see the tutorial).
    • International characters in filenames (Unicode support).
    • Large file support (over 4GB).
    • Wildcards support for adding, extracting and deleting files.
    • Recursive directory tree operations.
    • Add data to ZIP file from stream or memory.
    • Deflate and Enhanced Deflate support (compatible with Deflate64(tm) by PKWARE).
    • Open self-extracting ZIP archives.
    • All operations are done without any temporary files.
    • Custom Deflate algorithm implementation - no dependency on any open-source ZLib compression libraries (unlike many others).
    sample-winform-zip-extractor
  • Build 3793: .NET 4.0 support, massive attachment sending in Mail

    .NET 4.0 and Visual Studio 2010 are supported

    This release adds support for .NET 4.0 and Visual Studio 2010. Native .NET 4.0 builds of all our components are available.

    Sending mail messages with massive attachments

    In Rebex Mail, it is now possible to send huge attachmets using the new do-not-load-into-memory options. By huge, we mean attachments of virtually unlimited size. This feature is not enabled by default (because not loading data into memory has some drawbacks), so if you are interested in it, check out our Q&A forum.

    Tumbleweed's SSL-like encrypted tunnel support

    Tumbleweed SecureTransport servers are often used by large financial institutions. In addition to explicit and implicit TLS/SSL, these servers also support a proprietary SSL-like encryption tunnel that makes it possible to use encrypted connection but still be able to work with FTP-aware firewalls (designed for unencrypted FTP). Rebex FTP/SSL is one of the few FTP clients supporting this feature. To use it, just specify FtpSecurity.TumbleweedTunnel instead of .Explicit when connecting.

    Complete list of changes:

    • FTP: Information about invalid data IP address detection is now written to the log.
    • FTP: Fixed a bug that caused "/" local path argument of PutFiles/GetFiles methods to be treated as current directory.
    • FTP: A more meaningful exception is raised when a premature OK response is received while still uploading data.
    • FTP: More information is logged when a FTP connection is broken.
    • FTP: A full local path is passed in FtpBatchTransferProgressEventArgs.
    • FTP: Added experimental FtpOptions.UseLargeBuffers to use larger internal buffers (doesn't seem to make substantial difference on most systems).
    • FTP: Fixed a bug in PRET command implementation that caused problems with DrFTPd servers.
    • FTP: FtpTransferProgressEventArgs now contain RemotePath and LocalPath when available.
    • FTP: FtpBatchTransferException is now serializable.
    • FTP: On .NET Compact Framework, SO_LINGER option is enabled for data sockets.
    • FTP/SSL: Added support for Tumbleweed's SSL-like encrypted tunnel encryption.
    • FTP/SSL: Removed useless pre-authentication feature check in implicit SSL mode.
    • SFTP: Fixed a bug that caused "/" local path argument of PutFiles/GetFiles methods to be treated as current directory.
    • SFTP: Added Sftp.Bind and Scp.Bind method to make it possible to bind the SFTP or SCP object to existing SSH session.
    • SFTP: A full local path is passed in SftpBatchTransferProgressEventArgs.
    • SFTP: SftpTransferProgressEventArgs now contain RemotePath and LocalPath when available.
    • SFTP: SftpBatchTransferException is now serializable.
    • SFTP: Queued data packets are no longer written to the output stream after download operation has been aborted.
    • MIME: Fixed a bug that caused an exception to be raised when assigning one MailMessage's mail address collection property to another.
    • MIME: Added MimeOptions.DoNotCloseStreamAfterLoad option.
    • MIME: Added a workaround for parsing 'References' header with missing angle brackets.
    • S/MIME: Signed and/or encrypted e-mail messages with TNEF body are now parsed correctly.
    • SMTP: Added MimeOptions.DoNotPreloadAttachments to make it possible to handle extremely large attachments.
    • POP3: Added a workaround for QuarkMail Server that incorrectly announces authentication capabilies.
    • SSH Shell: Added experimental support for CSH to Shell class.
    • SSH Shell: Added Ssh.Bind method to make it possible to bind the Ssh object to an existing SSH session.
    • Terminal: Fixed a bug that caused cursor to be redrawn incorrectly in some cases.
    • SSH Core: Added a workaround for a server that announces support for "password" authentication but requires "keyboard-interactive" instead.
    • SSH Core: Fixed a bug in ZLIB compression routines that caused compatibility problems with GlobalScape and BitVise servers when compression was enabled.
    • SSH Core: Fixed a bug that caused SSH session to hang if a broken (incomplete) SSH packet arrived (rare).

    Rebex ZIP has just been released as well! We are now busy adding enryption capabilities to it. Is there a need for another ZIP component? We are sure there is, because Rebex ZIP is one of the few ZIP components that don't rely on any open-source library for ZLIB compression - yes, we wrote everything from scratch.

    Also, we just launched our Twitter account - If you would like to be informed about what's going on at Rebex, you are welcome to follow us!
  • Build 3723: Speed measuring in FTP and SFTP, enhanced terminal emulation

    Speed measuring in FTP and SFTP

    Rebex SFTP and Rebex FTP now have built-in transfer speed measuring support. To retrieve the estimated current speed, simply read it from the BytesPerSecond property of TransferProgress event arguments.

    Terminal emulation enhancements

    Terminal emulation classes in Rebex SSH Shell and Rebex Telnet were extended with lots of new methods and properties. Also, experimental support for Wyse 60 terminal emulation was added. If you use this, please let us know how well it works.

    Bugfixes and small enhancements

    This release contains lot of these. Many of them were reported or requested by our customers, so if there is something you would like to have, just let us know about it.

     

    Complete list of changes:

    • FTP: FtpTransferProgressEventArgs.BytesPerSecond property added that contains the estimated current speed.
    • FTP: Ftp.TransferProgress event is called less often on high-speed connections now (several times per second is sufficient).
    • FTP: Added support for OTC S/KEY(tm) (One-Time Password System) authentication according to RFC 2289 (optionally used by Serv-U FTP Server). (S/KEY is a trademark of Bellcore.)
    • FTP: Added FtpBatchTransferOptions.XCopy batch transfer mode. This is an alternative form of FtpBatchTransferOptions.Recursive that traverses all subdirectories but only transfers files that match the specified mask.
    • FTP: Maximum allowed UploadBufferLength changed from 64KB to 16MB.
    • FTP: New Ftp.DataAddress property to make it possible to specify active mode IP address transmitted to the FTP server.
    • FTP: HierarchyRetrieve events are no longer raised when only a single file is transferred.
    • FTP: A more meaningful exception is thrown when a directory path is passed to Ftp.GetFile method instead of file path.
    • FTP: FtpOptions.SendDataAsynchronously is deprecated and ignored.
    • FTP: Fixed PutFiles method to accept all kinds of root paths (such as "c:", "c:/", or "c:\" - previously, only "c:\." worked).
    • FTP/SSL: Added Ftp.DefaultImplicitSslPort constant.
    • SFTP: SftpTransferProgressEventArgs.BytesPerSecond property added that contains the estimated current speed.SFTP: A more meaningful exception is thrown when a directory path is passed to Sftp.GetFile method instead of file path.
    • SFTP: Sftp.TransferProgress event is called less often on high-speed connections now (several times per second is sufficient).
    • SFTP: Added SftpBatchTransferOptions.XCopy batch transfer mode. This is an alternative form of FtpBatchTransferOptions.Recursive that traverses all subdirectories but only transfers files that match the specified mask.
    • SFTP: Added support for getting and setting file creating date (only works with servers that support SFTP v4).
    • SFTP: Data-block-receiving routines optimized to write directly to the output stream without a round-trip through a temporary buffer.
    • SFTP: Added experimental SftpOptions.UseLargeBuffers to use larger internal buffers (doesn't seem to make substantial difference on most systems).
    • SFTP: Fixed SSH_FXP_READ packet logging code that caused some packets not to appear in the communication log.
    • SFTP: Added a workaround for servers where SSH_FXP_STAT command doesn't work correctly on directories.
    • SFTP: Fixed a bug in GetFile method that caused it to hang if length was specified.
    • SFTP: Fixed PutFiles method to accept all kinds of root paths (such as "c:", "c:/", or "c:\" - previously, only "c:\." worked).
    • SFTP: HierarchyRetrieve events are no longer raised when only a single file is transferred.
    • SFTP: Fixed a bug that made it impossible to call Sftp.GetFiles method on a root directory.
    • MIME: MailMessage.CreateReply now supports and processes the Refereces header according to RFC 2822 and common practices.
    • MIME: Added MailMessage.ToByteArray() and MailMessage.Load(byte[]) methods.
    • MIME: Attachment.ContentDescription property added.
    • MIME: MimeEntity.SetSignedContent and SetEnvelopeContent methods enhanced to disallow creating circular paths.
    • MIME: Added support for TNEF-based HTML bodies.
    • MIME: Fixed a bug in binary MIME parser that caused broken data to be parsed.
    • MIME: MailAddress.ToString and MailAddressCollection.ToString methods now quote display names if needed.
    • MIME: Fixed the MIME parser behavior with Mimeoptions.DoNotParseMimeTree options on non-compliant messages with lines too long.
    • MIME: MIME parser enhanced to handle non-compliant input data with duplicate <CR> characters.
    • S/MIME: Added a new overload of MailMessage.Sign method to make it possible to specify signature style.
    • S/MIME: Better handling of application/pkcs7-mime attachments that are not an S/MIME signature.
    • S/MIME: Added MimeOptions.SkipSenderCheck option to make it possible to skip sender check when validating signatures using MailMessage.ValidateSignature method.
    • S/MIME: Support for S/MIME messages encrypted using RC2 with effective key length not equal to key data length.
    • SMTP: Added NTLM and GSSAPI/Kerberos authentication support to .NET Compact Framework version.
    • SMTP/SSL: Added Smtp.DefaultImplicitSslPort and Smtp.AlternativeExplicitSslPort constants
    • POP3: Added NTLM and GSSAPI/Kerberos authentication support to .NET Compact Framework version.
    • POP3/SSL: Added Pop3.DefaultImplicitSslPort constant.
    • IMAP: Two new methods in ImapMessageCollection - ToSequenceNumberMessageSet and ToUniqueIdMessageSet.
    • IMAP: Added NTLM and GSSAPI/Kerberos authentication support to .NET Compact Framework version.
    • IMAP: Added ImapListFields.MessageStructure value, ImapMessageInfo.GetParts method and Imap.GetMessagePart method to make it possible to evaluate and download message views, resources and attachments individually without the need to download the whole message.
    • IMAP: Communication compression support added. Needs to be enabled using Imap.EnabledExtensions.
    • IMAP: Fixed a bug in ImapMessageSet.Add and AddRange method s that made them fail when adding multiple non-range values.
    • IMAP: Envelope parser enhanced to better handle envelopes with bad e-mail addresses.
    • IMAP: Date parser enhanced to handle rare two-digit-year date values properly.
    • IMAP: Added several new search criteria to ImapSearchParameter class: All, Unread (NotSeen), MessageSet, Keyword, NotKeyword and Not.
    • IMAP: Added a workaround for Exchange 2007 server that doesn't properly support searching address headers such as From, To or CC.
    • IMAP: Fixed a bug in GetMessageInfo that made it set the Seen flag when called with ImapListFields.Body even if ImapOption.DoNotPeekMessage was enabled.
    • IMAP/SSL: Added Imap.DefaultImplicitSslPort constant.
    • SSH Shell: Added Terminal.GetSelectedText method to make it possible to retrieve the currently selected text.
    • SSH Shell: Ssh.Login method now accepts empty usernames.
    • SSH Shell: SshTerminalControl.LogWriter property added to make logging easier.
    • Terminal: Added TerminalPalette.Sco palette.
    • Terminal: TerminalOptions.PersistColorsOnSgr added to make it possible to specify whether "CSI 0 m" escape sequence (default rendition) whould reset colors as well.
    • Terminal: TerminalScreen.GetRegion and TerminalScreen.GetRegionText methods added to make it easily possible to retrieve a part of the screen content.
    • Terminal: Block selection mode added (accessible through TerminalControl.SelectionMode property or using the Ctrl key).
    • Terminal: Added TerminalControl.MousePasteEnabled to make it possible to disable automated paste on right mouse button click.
    • Terminal: Terminal emulator now supports CSI 10, CSI 11 and CSI 12 escape sequences.
    • Terminal: Added SendToserver(byte[]) method to TerminalControl and VirtualTerminal classes.
    • Terminal: Added experimental support for Wyse 60 terminals.
    • Terminal: Added support for CFT and CBT escape sequences to terminal emulator.
    • Terminal: New overload of TerminalScreen.Clear method added to make it possible to clear the history buffer as well.
    • Terminal: Redefined background color in custom color scheme mode is now applied to all parts of the terminal screen.
    • Terminal: Instances of Shell class returned from Ssh.StartShell i Prompt mode now refuse to work if the prompt was not set.
    • Terminal: SshShell instances returned by Ssh.StartCommand no longer stop on prompt-like text when ReadAll is called.
    • Terminal: Changed TerminalControl.Save and VirtualTerminal.Save in ANSI mode to not write the final <CR><LF> sequence.
    • Terminal: Fixed a bug in "CSI 0 J" escape sequence interpreter that caused the whole line to be cleared (instead of onyl a part of it).
    • Terminal: Fixed a bug that occasionally caused InvalidOperationException to ve thrown on disconnected channels.
    • SSH Core: Added SshFingerprint.Compute and SshFingerprint.FromBase64String methods to make it possible to easily calculate a fingerprint of the supplied public key.
    • SSH Core: ZLIB compression is now switched off by default (caused problems with some servers).
    • SSH Core: Client KEX_INIT packet is sent without waiting for the server side one (this is the only proper behavior).
    • SSH Core: Added SshSession.KeepAlive method to make it possible to periodically "ping" the SSH connection to keep it working and detect failures.
      • Security: Added Certificate.LoadDerWithKey method to make it possible to easily load certificates with private keys in external file (Unix-style).
      • Security: Support for PKCS #7 EnvelopedData encrypted using RC2 with effective key length not equal to key data length.
      • Security: Fixed a bug in EnvelopedData class that cause a NullReferenceException to be raised when unsupported encryption algorithm is encoutered.
      • Security: Internal ModPow method optimized.
      • Security: Key generation support removed from RSAManaged a DSAManaged. No part of any of our components ever used it at it was prohibitively slow anyway.
      • TLS/SSL: TlsSocket.SessionID is deprecated because it's global cache was unsuitable for most applications. TlsSocket.Session (and the associated TlsSession class) should be used instead.
      • ProxySocket: The underscore character is now allowed in hostnames (this is non-standard, but used by Windows).
      • ProxySocket: FileLogWriter is capable of logging into a single file from multiple applications now.
      • ProxySocket: ProxySocket.Send behavior changed to always send all the data or fail.

      A beta version of Rebex ZIP will be available next week and a final release will follow in spring. If anyone is interested in trying this out, please let us know!

      We also launched a new support forum recently. I'm sure those of you who use stackoverflow.com will find it familiar :-)

    • Build 3588: Kerberos support in Rebex Mail

      GSSAPI and Kerberos support in Mail and Secure Mail

      Few months ago, we introduced GSSAPI/Kerberos authentication support in Rebex SFTP - and now it is available in Rebex Mail and Rebex Secure Mail as well! Microsoft SSPI is used as an underlying authentication provider for both. In practice, this means you can authenticate with SMTP, POP3 or IMAP to Microsoft Exchange server using Kerberos single-sign-on, which is definitely an improvement over NTLM. Negotiate algorithm is also supported - this automatically selects either NTLM or Kerberos, depending on what is available.

      This feature is not supported in .NET Compact Framework edition of Rebex (Secure) Mail - it will be added in the next release.

      SFTP v4 support

      Rebex SFTP supports v4 of the protocol now. In practice, one of the main benefits is that it is possible to select transfer type (Sftp.TransferType) without need to select the target OS type first (Sftp.ServerType). Unfortunately, many SFTP servers inclusing OpenSSH only supports SFTP v3, which means that the target OS type has to be still set for these. Another benefit of SFTP v4 is that it uses UTF-8 charset by default, which is a great improvement - in v3, charset was undefined.

      Integrated ZLIB support in SSH, SFTP, SCP and SSH Shell

      ZLIB is used to compress all communication. This means faster file transfers in SFTP and SCP when transferring compressible files and better throughput for Rebex SSH Shell, where most data is simple text. To disable ZLIB compression and make the new version work just like before, use SshParameters.Compression property, as described in this SFTP tutorial. This also means that the experimental ZLIB compression support introduced in build 3428 no longer works because there is no need for it now.

      Complete list of changes:

      • FTP: Added FtpOptions.ConnectPassiveLater option - makes the passive mode transfer initialize the connection only after the LIST/NLST/RETR/STOR commands are sent (instead of after PASV).
      • FTP: Enhanced MODE Z support.
      • FTP: Added a workaroud for bad PASV implementation at ftp-edi.pubnet.org.
      • FTP: CCC command no longer actively sends close_notify TLS message by default.
      • FTP: Fixed a bug in proxy code that caused data transfers to fail when using HTTP CONNECT proxy with NTLM authentication.
      • SFTP: SFTP v4 support added.
      • SFTP: Fixed a bug in CreateDirectory/ChangeDirectory workaround for CoreFTP.
      • SFTP: Added workaround for ProFTPd's mod_sftpd SSH_FXP_REALPATH command that fails for newly created directories.
      • MIME: MailMessage object's BodyText and BodyHtml properties now remove illegal characters when set.
      • MIME: LinkedResource.FileName property added.
      • MIME: Mail messages with empty TNEF/winmail.dat attachment no longer cause an exception to be thrown.
      • S/MIME: Added MimeOptions.SkipCertificateUsageCheck option to make it possible to skip certificate usage check.
      • S/MIME: Fixed a bug that caused an exception to be thrown when signing a mail message on FIPS-enabled systems.
      • SMTP: Kerberos, NTLM and Negotiate authentication methods through GSSAPI/SSPI are now supported (not yet available on .NET Compact Framework).
      • SMTP: GSSAPI or NTLM is also attempted in Auto mode if the mail server doesn't support any other authentication methods.
      • POP3: Kerberos, NTLM and Negotiate authentication methods through GSSAPI/SSPI are now supported (not yet available on .NET Compact Framework).
      • POP3: Added workaround for I&ES Mail Server that doesn't like TOP n 1 command.
      • IMAP: Fixed a bug in Imap object's External authentication method implementation.
      • IMAP: GSSAPI or NTLM is also attempted in Auto mode if the mail server doesn't support any other authentication methods.
      • IMAP: Added a workaround for servers that reply with FETCH BODYSTRUCTURE what FETCH BODY is requested.
      • IMAP: Kerberos, NTLM and Negotiate authentication methods through GSSAPI/SSPI are now supported (not yet available on .NET Compact Framework).
      • IMAP: Message structure parser enhanced to be compatible with more servers and distinguish attachments and linked resources.
      • SSH Shell: Added workaround for SSH packets 101 that some SSH servers were observed to use.
      • Terminal: Fixed a bug that caused Disconnect event not to be raised when some types of connection failures occured.
      • Terminal: TerminalControl now correctly resizes itself when hosted in WPF.
      • SSH Core: Fixed a bug in ArcFour cipher implementation that made it unusable.
      • SSH Core: Fixed a bug that caused an SSH welcome message to be parsed incorrectly when split accross multiple packets.
      • SSH Core: Added support for ZLIB transfer compression.
      • ProxySocket: Proxy object now has Encoding property that makes it possible to specify character set to be used for parsing server responses.
      • ProxySocket: ProxySocketException.ErrorCode property now returns HTTP and Socket4/Socks5 error codes when available.
      • ProxySocket: SspiAuthentication and GssApiProvider classes added that provide GSSAPI/SSPI functionality.
      • Security: Certificate's CRL distribution point list can be accessed using GetCrlDistributionPoints method.

      We are also progressing nicely on Rebex ZIP component as well. If there is something you would like it to support, please visit our customer feedback & ideas forum and add some suggestions!

    • HOWTO: Simulate Ctrl+C programatically in SSH or Telnet

      In some applications written using Rebex SSH Shell or Rebex Telnet that utilize a terminal emulation or virtual terminal, it might be useful to be able to send Ctrl+C sequence programatically. And although this is easy when you know how Ctrl+C actually behaves in Windows, it is definitely not straightforward enough. So this is how you do this:

      C#:

      terminalControl.SendToServer(new ConsoleKeyInfo('\x3', ConsoleKey.C, false, false, true));

      VB.NET:

      terminalControl.SendToServer(New ConsoleKeyInfo(Convert.ToChar(3), ConsoleKey.C, False, False, True))

      (where terminalControl is an instance of TerminalControl or VirtualTerminal class)

      This code creates a ConsoleKeyInfo that simulates a key with ASCII code 3 (ETX special character), console key ‘C’ and a pressed Ctrl key. This simulated keystroke is then sent to the server using the SendToServer method.

      UPDATE: Are your curious why using '\x3' equals to sending Ctrl+C? Do you want to know other common control codes? Check the table in following Wikipedia article: wikipedia.org/wiki/ASCII#ASCII_control_characters

    • Build 3484: Few bugfixes in Secure Mail and SFTP/SSH Shell

      This releases fixes two bugs in the previous build - one in Rebex SFTP and Rebex SSH Shell's GSSAPI/Kerberos authentication, the other in Rebex Secure Mail's SHA-2 signature support.

      Complete list of changes:

      • SSH Core: Fixed a bug in GSSAPI authentication that caused it to work improperly in 32bit .NET Framework.
      • S/MIME: SHA-2 now works with private keys in non-Microsoft key storages (such as Smart Cards) as well.
      These are the only changes - if you don't need this functionality, you can keep using build 3479.
    More Posts Next page »
    Powered by Community Server (Personal Edition), by Telligent Systems