+1 vote
by (360 points)
edited

I want to create an ASP.NET application which does telnet commands. I want the user to get a shell where he can do all of his commands. Is it possible with Rebex? Is there an web example which does that?

3 Answers

+2 votes
by (132k points)
edited by
 
Best answer

Rebex Terminal Emulation can be used from ASP.NET applications, but it doesn't include an ASP.NET-based terminal control. Fortunately, there are several ways around this.

Essentially, what you need is to have a Rebex Terminal Emulation running on the server (as part of your ASP.NET application), but make it display the terminal screen using the client's web browser (and make the browser send back keystrokes).


Some of our clients have used VirtualTerminal's screen scraping capabilities to retrieve a HTML code to send to the browser to display, but although this is suitable for some scenarios, it is not perfect.


A better option is to implement an AJAX client-side control that establishes a WebSocket connection to the ASP.NET application, receives screen data and updates its screen accordingly (and send back the keystrokes).

Rebex Terminal control supports custom render targets, and a proof-of-concept solution (download) that shows how to use it with HTML5 canvas and SignalR 2 to achieve this:

alt text

The web application supports both SSH and telnet (please note that username/password is only relevant to SSH) and works in all major browsers, although possibly not in some of their outdated versions.


The code is not yet production quality - it lacks comments, doesn't handle some kinds of errors very well, does not prevent some keystrokes from invoking default behavior, does not support resizing, etc. However, it demonstrates that implementing a browser-based terminal client using Rebex Terminal Emulation is not complicated.


Any feedback is welcome!

by
Hey Lukas, any chance you would have an updated sample.  I d/l the sample you had on this post, but the license for the trial version has expired.
by (132k points)
edited by
0 votes
by (360 points)
edited

Hi Lukas,

Thanks for your help. Waiting to see your code

by (132k points)
edited

I edited my original answer. It now includes a link to the code. Please give it a try and let me know what you think.

0 votes
by (360 points)
edited

Thanks Lukas!! this is exactly what I was looking for

...