Re: How to reload a Cisco Router in C#? - WeOnlyDo Discussion board

Re: How to reload a Cisco Router in C#? (General questions)

by wodDamir, Tuesday, May 13, 2008, 09:13 (6038 days ago) @ zubenelgenubi

Hi,

I see that you have two Connect calls. You should remove the first one. Also, you are setting some properties twice, which isn't needed. From the sample you sent, you should remove the Command property, and add show ver\r\n to your execute call.

Also, i don't see other code, but I assume that you left all the events there. Unforunately, the sample uses events, and is designed to run in non-blocking mode. Since you use blocking mode, you shouldn't be using events, since that could cause exactly the problem you are experiencing.

I would strongly suggest that you start a new Windows Application Project, and then add that code (modified with suggestions that I provided).

Hope I helped.

Regards,
Damba


Complete thread: