Click here to Skip to main content
15,908,173 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to use a smoothing algorithm? Pin
Pete O'Hanlon20-Oct-08 2:00
mvePete O'Hanlon20-Oct-08 2:00 
QuestionDrag and Drop Controls Pin
User 543536419-Oct-08 18:53
User 543536419-Oct-08 18:53 
AnswerRe: Drag and Drop Controls Pin
N a v a n e e t h19-Oct-08 22:35
N a v a n e e t h19-Oct-08 22:35 
AnswerRe: Drag and Drop Controls Pin
Mycroft Holmes19-Oct-08 22:43
professionalMycroft Holmes19-Oct-08 22:43 
GeneralRe: Drag and Drop Controls Pin
User 543536419-Oct-08 22:50
User 543536419-Oct-08 22:50 
GeneralRe: Drag and Drop Controls Pin
Mycroft Holmes20-Oct-08 0:50
professionalMycroft Holmes20-Oct-08 0:50 
GeneralRe: Drag and Drop Controls Pin
User 543536420-Oct-08 14:09
User 543536420-Oct-08 14:09 
QuestionTCP and ASP and Connections Pin
NULPTR19-Oct-08 11:24
NULPTR19-Oct-08 11:24 
Hello all,

I was not sure if I should throw this into C# or Asp.net forum, please move if you feel appropriate.

Situation:

Programming an ASP website that will allow scheduling and connecting to a remote Cisco router to help students learn to configure Cisco routers during their Cisco classes. If you did not know, Vista no longer has Hyperterminal as XP did, and Hyperterminal is no longer free. Aside from the fact that there are some open source/free TCP/IP clients out there, the need arises to make it as simple for the student as possible.

My solution was/is to provide the solution via a webpage.

Problem:

I am quite new to ASP in general, though not C#. I wrote my own "Telnet" client that connects to the router and so far as I can tell works quite well. I am now trying to translate this Winforms application over to a ASP page that can be deployed onto the schools' server.

I used a TCPClient and Stream in the Winforms application to work out the telnet client part. In trying to translate this over to an ASP page, I am unclear exactly where I need to put the connection info (ie Page_Load). I need to keep the connection open to the router at all times. Currently in my Page_Load, I establish the connection and stream, however stream.DataAvailable does not seem to work (I was using it in a loop to get the greeting and passphrase prompt). However, if I just read the stream, in a combination of 2 separate Do..While loops, I get the initial greeting/passphrase prompt.

Aside from that issue, the stream is disconnected after the initial Page_Load. I need to be able to keep the connection alive for the duration that the user is logged into/viewing the webpage, and also process (via a textbox entry line on the same webpage) any commands sent by the person connected.

Can anyone provide some suggestions on how to accomplish this? Is anyone available via some form of Instant Messenger that can maybe help me out (I would not normally ask this, but, I do not know any other programmers in my area)?

Any help would be appreciated!

Thanks!
AnswerRe: TCP and ASP and Connections Pin
Tony Richards19-Oct-08 12:17
Tony Richards19-Oct-08 12:17 
GeneralRe: TCP and ASP and Connections Pin
NULPTR19-Oct-08 13:07
NULPTR19-Oct-08 13:07 
QuestionPassing a SQL 2005 vBinary document object (a Word document) to an instance of Word.Document. Pin
dunloe19-Oct-08 9:13
dunloe19-Oct-08 9:13 
AnswerRe: Passing a SQL 2005 vBinary document object (a Word document) to an instance of Word.Document. Pin
Wendelius19-Oct-08 9:22
mentorWendelius19-Oct-08 9:22 
GeneralRe: Passing a SQL 2005 vBinary document object (a Word document) to an instance of Word.Document. Pin
dunloe20-Oct-08 5:53
dunloe20-Oct-08 5:53 
GeneralRe: Passing a SQL 2005 vBinary document object (a Word document) to an instance of Word.Document. Pin
Wendelius20-Oct-08 6:53
mentorWendelius20-Oct-08 6:53 
GeneralRe: Passing a SQL 2005 vBinary document object (a Word document) to an instance of Word.Document. Pin
dunloe20-Oct-08 7:24
dunloe20-Oct-08 7:24 
Questionhow to classify the content of textbox Pin
lolla200619-Oct-08 8:47
lolla200619-Oct-08 8:47 
AnswerRe: how to classify the content of textbox Pin
Wendelius19-Oct-08 9:07
mentorWendelius19-Oct-08 9:07 
GeneralRe: how to classify the content of textbox Pin
lolla200619-Oct-08 10:46
lolla200619-Oct-08 10:46 
GeneralRe: how to classify the content of textbox Pin
Guffa19-Oct-08 15:33
Guffa19-Oct-08 15:33 
GeneralRe: how to classify the content of textbox Pin
lolla200622-Oct-08 7:14
lolla200622-Oct-08 7:14 
GeneralRe: how to classify the content of textbox Pin
Guffa22-Oct-08 22:05
Guffa22-Oct-08 22:05 
GeneralRe: how to classify the content of textbox Pin
Wendelius19-Oct-08 18:00
mentorWendelius19-Oct-08 18:00 
GeneralRe: how to classify the content of textbox Pin
lolla200622-Oct-08 7:17
lolla200622-Oct-08 7:17 
GeneralRe: how to classify the content of textbox Pin
Wendelius22-Oct-08 8:46
mentorWendelius22-Oct-08 8:46 
QuestionSimple case statement looking for Enter key Pin
Brad Wick19-Oct-08 8:22
Brad Wick19-Oct-08 8:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.