PowerTCP Telnet for .NET

from $349.00
Available Platforms

Send Telnet Commands With Ease

PowerTCP Telnet for .NET is re-designed to provide the most advanced Internet Communications components available, while remaining as easy to use as ever. The new design promotes a Model-View-Controller (MVC) application design, localizing your protocol functions and settings to a reusable model class. This enhanced library requires fewer resources, provides more flexibility, and elicits code that is easier to re-use and maintain.

  • Supports .NET 2.0 features including generics, IPv6, and X509 certificates
  • Secure Socket Layer (SSL) security is integrated
  • Lightweight, Single Dll streamlines your app
  • MONO support
  • Many samples and code examples

Telnet telnet1 = new Telnet();
telnet1.Connect("myServer");
telnet1.Login(new Credentials("myUsername", "myPassword", "$");
//Send a list command

telnet1.Write("ls -la\r");

//Read until prompt, write to console
string listing = telnet1.ReadToDelimiter("$");
Console.Write(listing);

//Send an exit command; server will close the connection
telnet1.Write("exit\r");
//Read any remaining data before the shutdown and write to console
Console.Write(telnet1.ReadToEnd());

Feature Overview

Easy To Use
  • Auto-login and option negotiation capabilities minimize coding
  • Blocking reads are specifically designed for scripting applications
  • Inherent multi-threading support for user-interactive applications
  • Pty property can be set to any control derived from TextBoxBase, turning any TextBox into a Telnet terminal
  • Log event provides debugging support and session logging
Flexible
  • Explicit and implicit SSL security supported
  • Use international character sets
  • HTTP, SOCKS4 and SOCKS5 proxy support
  • 64-bit Operating System support
  • Rexec, Rsh and Rlogin components in addition to Telnet

Samples and Documentation

  • Numerous sample projects for C#, VB.NET, C++/CLI, including ASP.NET
  • Integrates with Visual Studio 2005, 2008, 2010, 2012
  • Comprehensive MS Help 2.0 and Help Viewer integrated documentation
  • Stand-alone and online documentation

Included with PowerTCP Telnet for .NET

  • Telnet, Rexec, Rlogin and Rsh drag and drop components layer protocols over TCP
  • Sample projects for C#, VB.NET, C++ including ASP.NET
  • Comprehensive MS Help 2.0 integrated documentation
  • Stand-alone and online documentation also included
  • Components and comprehensive help integrate with Visual Studio 2005, 2008, 2010, 2012
  • Free introductory support and email support during subscription period

 

Component Description
Telnet Component Implements the Telnet protocol within any .NET application.
Rlogin Component Implements the remote login protocol within any .NET application.
Rexec Component Implements the remote execution protocol within any .NET application.
Rsh Component Implements the remote shell protocol within any .NET application.

 

Supported Environments

PowerTCP for .NET 4.x components and classes operate on any Microsoft operating system that fully supports the Microsoft .NET Framework, including 64-bit Windows. .NET components are dependent on the Framework rather than a specific operating system. Products support .NET Framework versions 2.0 through 4.8 and .NET Standard 2.0 (.NET Core, .NET 5, .NET 6, .NET 7, etc.). Contact Dart for a list of .NET Framework 1.x.Component products. PowerTCP for .NET can be used with any .NET compliant language, please see the table below.

Supported languages:
  • C#
  • VB.NET
  • Managed C++
  • Powershell
Tested in the following application environments:
  • Windows forms desktop applications
  • Windows console applications
  • Windows ASP.NET web applications and Web Sites
  • Windows service applications
  • Windows web service applications
  • Windows .NET Framework 4 Client Profile
  • Windows Presentation Foundation (WPF) applications
Tested in the following development environments:
  • Visual Studio .NET (2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, 2022)
  • Mono runtime 2.10 or greater

 

 

PowerTCP for .NET components do not currently support execution within Silverlight. If you are interested in using Dart products within your Silverlight solution, contact support@dart.com for more options.

Code Examples

These PowerTCP Telnet for .NET code snippets can be copied and pasted into your project.

Code Snippet Description
Automated Session Demonstrates how to write a scripted automated session.
Option Negotiation Demonstrates how to manually handle telnet option negotiation.
Receive and Display Data Demonstrates how to receive and display data.

 

 

Example Projects

Samples are working applications demonstrating Sockets for .NET components in C#, VB.NET and C++/CLI. Source code included.

Name Description
Automated Client Demonstrates execution of an automated Windows Forms application using Telnet.
Rexec Client Demonstrates execution of a command using Rexec. Windows Forms application.
Rlogin Client Demonstrates a user-interactive Rlogin Windows Forms application.
Rsh Client Demonstrates execution of a command using Rsh. Windows Forms application.
Telnet Client Demonstrates a user-interactive Telnet Windows Forms application.
Automated Console Demonstrates use of Telnet in a console application. Windows Forms application.
PTY Client Demonstrates use of the Pty feature, which adds a TextBox interface to the Telnet component. Windows Forms application.
Automated Web Demonstrates use of Telnet on a web page. C#, VB source.

 

 

Product Release History for PowerTCP Telnet for .NET

The following is a list of public releases for all components shipped with PowerTCP Telnet for .NET (Latest Release 2023-2-37) 

 

PowerTCP Telnet for .NET

   Current Version: 6.1.0.7

6.1.0.7 Released: 2023-2-27



Dart Communications is pleased to announce the release of PowerTCP Telnet for .NET 6.1.

 

Changes in this release:

  • Licensing has been refactored. Please review documentation here.
  • Support for .NET Framework 3.5 has been dropped and a minimum of .NET Framework 4.5 is now required. (Please contact sales@dart.com if you require an assembly for a previous version of .NET Framework.)
  • Improved Visual Studio Integration.
  • Full support for .NET 7.

 

 

4.4.11.2   Released: 2020-12-16


 

Product fixes in this release:

  • Fixed a minor compatibility issue so that Dart.Telnet.Standard.dll can be used with .NET 5.0.

 

 

4.4.10.0   Released: 2019-06-17


 

  • Fixed an issue in the .NET Standard assembly that resulted in string resources not being available when certain exceptions occurred. (1075)
  • Fixed an issue that resulted in .NET Standard assemblies being unusable in newer .NET Core preview releases

 

 

4.4.8.0 Released: 2018-07-19


 

  • Added support for .NET Standard 2.0 and .NET Core 2.0
  • New .NET Core 2.0 sample projects, referencing the Dart.Telnet.Standard dll
  • Updated trial license operation for use on .NET Standard-compatible platforms
    - Details regarding trial operation for Dart.Telnet.Standard.dll can be found in the Licensing and Trial Operation topic in the included help documentation

 

 

4.4.7.0   Released: 2017-03-08


 

  • Visual Studio 2017 compatibility.

 

 

4.4.6.0   Released: 2016-12-19


 

Product fixes in this release:

  • Login prompt exception messages have been improved and will now report which prompts could not be found. (655)

 

 

4.4.5.1   Released: 2012-11-15

 

  • Changed serialization to use simple partial name serialization to improve cross-version compatibility.

 

Product fixes in this release:

  • Addressed issues in the sample Telnet model code that caused an exception to be incorrectly thrown during the login process.
  • Addressed an issue where the control might hang if the remote server closes the connection during a read with the Telnet control. (5446)
  • Addressed an issue where calling the Close method on the Telnet control in the StateChanged event may cause the Telnet control to hang. (5631)

 

 

4.4.4.5   Released: 2012-10-24


 

  • Updated for Visual Studio 2012 integration and Windows 8 compatibility.
  • Trial licensing operation updated.

 

Product fixes in this release:

  • Addressed a globalization issue that prevented correct operation for systems using the following language cultures: Azeri (az), Azeri-Latin (az-Latn), Azeri-Latin-Azerbaijan (az-Latn-AZ), Turkish (tr), Turkish-Turkey (tr-TR) (TFS31)

 

 

4.4.3.1   Released: 2012-07-12


 

Product fixes in this release:

  • Fixed a licensing issue with web service applications.
  • Updated the title bar of licensing messages to not indicate a product is in trial when it is licensed.

 

 

4.4.2.0   Released: 2012-06-27


 

  • Updated trial operation behavior and removed obstacle to using product in .NET Framework 4.5.

 

 

4.4.1.1   Released: 2012-04-30


 

Product fixes in this release:

  • Fixed an issue that prevented operation in MONO. A NotImplementedException no longer occurs when trying to connect in a MONO environment. (5586)

 

 

4.4.0.2   Released: 2011-03-24


 

  • Some custom Start delegates have been replaced with the .NET Framework standard WaitCallback delegate. This generally means that callback functions no longer include the calling component as a parameter (this is true even for custom delegates that were not replaced).
  • The Connect method was updated to take the new TcpSession object as a parameter. TcpSession is a serializable object that facilitates the saving of session settings.
  • The AuthenticateAsClient and AuthenticateAsServer methods were updated to take the new ClientSecurity and ServerSecurity objects as parameters, respectively. These two objects are serializable, facilitating the saving of security sessions.
  • The ReadToX functions (ReadtoDelimiter, ReadToCount, ReadToEnd) were updated to throw the new DataException when an error condition occurs. DataException includes a DataRead field which provides the data read prior to the exception.
  • Several samples were updated with "model" classes, to fall more in line with the Model-View-Controller (MVC) design philosophy. For more on MVC, see the "MVC Design in Applications" page of the help file.

 

Product fixes in this release:

  • Fixed an issue where the components would not use a specified local port under certain circumstances. (5359)

 

 

4.2.1.1   Released: 2010-05-14


 

  • PowerTCP Telnet has been updated with a new install and VS 2010 integration.
  • Product fixes in this release:
  • Fixed a delay that would sometimes occur during the first Connect to a server. (5118)
  • Data Direction in the Log event handler has been fixed to no longer always be DataDirection.In. (5169)
  • The behavior of the Login method has changed. The default timeout value for each Read is now 6 seconds. A timeout exception will occur if the expected login prompt or password prompt is not found before the timeout period expires. (5216)
  • Aborting an explicitly secure connection during the SSL Handshake no longer negatively impacts an immediate subsequent explicitly secure connection. (5275)

 

 

4.2.0.1   Released: 2010-01-05


 

  • Telnet for .NET now uses native Framework classes for SSL functionality.
  • Telnet for .NET has a new licensing model. External runtime license files are no longer utilized. Instead, a license resource is generated and embedded within the executing assembly.

 

 

4.1.2.0   Released: 2009-10-30


 

  • An update to licensing and the help file. Note that users with an existing 4.1 Developer License File must obtain a new Developer License File for this release.

 

 

4.1.1.0   Released: 2009-06-03


 

  • An update to licensing and the help file.

 

 

4.1.0.0   Released: 2009-05-13


 

  • The component Error event handler now utilizes Dart.Common.ComponentErrorEventArgs.
  • Telnet has been updated with a new easier-to-use licensing model.

 

 

4.0.0.1   Released: 2009-02-17


 

  • This latest version of the venerable PowerTCP product line gets a new .NET 2.0 re-design that leverages the power of the latest .NET environments to provide the most advanced Internet Communications components available. Some of the features include:
  • Auto-login capabilities
  • Auto-option negotiation with easy configuration options
  • Secure SSL Telnet support
  • Blocking reads that wait for defined delimiters, specifically designed for scripting applications
  • Start method for easily implemented multi-threaded applications, including cross-threading marshaling support
  • PTY property binds a TextBox to the Telnet component as a ready-made interface for interactive online communications
  • Logging event for easy debugging and session logging
  • Proxy support
  • Includes Rexec, Rsh and Rlogin components in addition to Telnet

PowerTCP Telnet for .NET Downloads

for .NET Standard 2.0 (supported implementations can be found here) .NET Framework 4.5-4.8

 


 

Download Windows Installer (product distribution; includes sample projects)

 

Download Sample projects (only)

 

NuGet

  1. Add a NuGet Reference to your project.
  2. Open a command line prompt.
  3. Install the Dart License tool (.NET 6.0 required): dotnet tool install -g dotnet-dartlicense
  4. Run the Dart License tool and follow the on screen prompts to activate a trial.

PowerTCP Telnet for .NET Features

 

PowerTCP Telnet for .NET Telnet Component

The Telnet component fills the Telnet gap in the .NET Framework by negotiating options with remote Telnet servers. Features include:

 

  • Login function that automatically sends username and password
  • Automatic and manual option negotiation options for maximum flexibility
  • Explicit and implicit SSL security options
  • Blocking reads that wait for defined delimiters, specifically designed for scripting applications
  • Start method for easily implemented mult-threaded applications, including cross-threading marshaling support
  • Pty property binds a TextBox to the Telnet component as a ready-made interface for interactive online communications
  • Logging event for easy debugging and session logging
  • Proxy support for Http, SOCKS4, SOCKS5
  • Integrates with Visual Studio 2005, 2008, 2010, 2012
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

 Return to Overview

 

Looking for an SSH Component?

PowerTCP SSH and SFTP for .NET

PowerTCP Telnet for .NET Features

 

PowerTCP Telnet for .NET Rsh Component

 

Use the Rsh component to easily execute shell commands on a remote host. Features include:

  • Execute function that executes specified commands on the remote host
  • SSL security options
  • Start method for easily implemented mult-threaded applications, including cross-threading marshaling support
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008, 2010 and 2012 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

 Return to Overview

 

Looking for an SSH Component?

PowerTCP SSH and SFTP for .NET

PowerTCP Telnet for .NET Features

 

PowerTCP Telnet for .NET Rlogin Component

 

Use the Rlogin .NET component to easily login to a remote host using rlogin. Features include:

Login function that automatically sends username and password

  • SSL security options
  • Blocking reads that wait for defined delimiters, specifically designed for scripting applications
  • Start method for easily implemented mult-threaded applications, including cross-threading marshaling support
  • PTY property binds a TextBox to the Telnet component as a ready-made interface for interactive online communications
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008, 2010 and 2012 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

 Return to Overview

 

Looking for an SSH Component?

PowerTCP SSH and SFTP for .NET

PowerTCP Telnet for .NET Features

 

PowerTCP Telnet for .NET Rexec Component

 

Use the Rexec component to execute a command on a remote host. Features include:

  • Execute function that executes specified commands on the remote host
  • SSL security options
  • Start method for easily implemented mult-threaded applications, including cross-threading marshaling support
  • Logging event for easy debugging and session logging
  • Proxy support
  • Integrates with versions 2005, 2008, 2010 and 2012 of Visual Studio
  • Supports C#, VB.NET, C++/CLI, ASP.NET and other .NET compliant development environments

 

 Return to Overview

 

Looking for an SSH Component?

PowerTCP SSH and SFTP for .NET

See all PowerTCP Telnet for .NET Code Examples

Automated Session Example

The following example demonstrates an automated Telnet session, with the returned data written to console.

 

Telnet telnet1 = new Telnet();
telnet1.Connect("myServer");
telnet1.Login(new Credentials("myUsername", "myPassword", "$");

//Send a list command
telnet1.Write("ls -la\r");

//Read until prompt, write to console
string listing = telnet1.ReadToDelimiter("$");
Console.Write(listing);

//Send an exit command; server will close the connection
telnet1.Write("exit\r");
//Read any remaining data before the shutdown and write to console
Console.Write(telnet1.ReadToEnd();

 

To download a trial please visit the PowerTCP Telnet for .NET product page.

See all PowerTCP Telnet for .NET Code Examples

 Open Negotiation Example

The following examples demonstrates manual client/server option negotiation. Typically, the Telnet component will handle option negotiation automatically. However, the developer also has the flexibility to manually set options to be used and rejected.

 

//Standard telnet port, add standard telnet options.
telnet1.ClientOptions.Add(new Option(OptionCode.SuppressGoAheads, 
        OptionState.RequestOn));
telnet1.ClientOptions.Add(new Option(OptionCode.WindowSize, null,
        new Byte[] { ((Byte)(0)), ((Byte)(80)), ((Byte)(0)), ((Byte)(24)) }, 
        OptionState.RequestOn));
telnet1.ClientOptions.Add(new Option(OptionCode.TerminalType,
        new Byte[] { ((Byte)(0)), ((Byte)(116)), ((Byte)(116)), ((Byte)(121)) }, 
        OptionState.RequestOn));

telnet1.ServerOptions.Add(new Option(OptionCode.SuppressGoAheads, null,
        OptionState.RequestOn));
telnet1.ServerOptions.Add(new Option(OptionCode.Echo, nullOptionState.RequestOn));
telnet1.ServerOptions.Add(new Option(OptionCode.OutputPageSize, null,
        OptionState.RequestOn));

 

In addition, negotiation can be handled in real-time, using the CommandReceived event and SendXXX commands. In the following example, explicit security is negotiated in the CommandReceived event handler.

 

using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

Telnet telnet1 = new Telnet();

private void telnet1_CommandReceived(object sender, CommandEventArgs e)
{
    //Handles negotiation for an explicitly secure connection.
    try
    {
        if (e.OptionCode == OptionCode.Authentication)
        {
            if (e.Command == Command.Do)
                telnet1.SendOption(Command.Will, OptionCode.Authentication);
            else if (e.Command == Command.SB && e.SubOption[0] == 1)
            {
                //Server expects a SEND request (IS).
                byte[] response = new byte[4];
                response[0] = 0// is
                response[1] = 7// ssl
                response[2] = 0// AuthClientToServer
                response[3] = 1// START_SSL is our request
                telnet1.SendSubOption(e.OptionCode, response);
            }
            else if (e.Command == Command.SB && e.SubOption[0] == 2)
            {
                //Setup client security with the target host, and a callback that
                //executes when the remote host presents its certificate.
                ClientSecurity security = new ClientSecurity();
                security.TargetHost = "mySecureHost";
                security.ValidationCallback += remoteCertificateValidation;

                //Authenticate the server.
                telnet1.AuthenticateAsClient(security);
            }
        }
    }
    catch (Exception ex)
    {
        //Close the connection if there is an error.
        telnet1.Close();
    }
}

private bool remoteCertificateValidation(
   object sender,
   X509Certificate remoteCertificate,
   X509Chain chain,
   SslPolicyErrors sslPolicyErrors)
{
    return true; //Accepts any certificate, even if invalid
}

 

To download a trial please visit the PowerTCP Telnet for .NET product page.

See all PowerTCP Telnet for .NET Code Examples

 Receive and Display Data Example

The following example demonstrates receiving data and displaying it.

 

//Telnet.Read(buffer) performs a single socket read, blocking until at least one byte is read, up to as much data as is available on the socket or buffer.Length, whichever is lowest.
//This code will block until the connection is closed or Telnet.SocketOption.ReceiveTimeout has expired.

Telnet telnet1 = new Telnet();
telnet1.Connect("myServer");
telnet1.Login(new Credentials("myUsername", "myPassword", "$");
try
{
    byte[] buffer = new byte[1024];
    Data data = telnet1.Read(buffer);
    while (data != null)
    {
        Console.Write(data.ToString());
        data = telnet1.Read(buffer);
    }
}
catch(Exception ex)
{
    //handle exception as desired
}
finally
{
    telnet1.Close();
}

 

To download a trial please visit the PowerTCP Telnet for .NET product page.

Purchase Options

Customize your product and support options match your needs. Discounts are applied when products are purchased in multiples or within available product suites.

$0.00 discount
 
$499.00

Have any questions about purchasing? See our Sales FAQ