WODSSH.NET- Timeout due to inactivity (General questions)
Hello,
We have been using WODSSH to conect to UNIX server from our windows web application for the last three years.
We suddenly started getting timeout due to inactivity issue when we try to read some log or list files from unix server.
Web applications is running on Microsoft Server 2003 server.We use WOD SSH.net version 2.2.4.66.
We are able to connect to server and execute some basic commands, the issue occurs when we try to read a log or list file from UNIX server. We see that we are not able to read the stream of data and it gets timedout at Ssh1.WaitFor(promptString);
We started having this issue only during the last few days.. Might this be related to latest Windows serevr 2003 patch ? Any help you provide is much appreciated.
Below is the code snippet we use
Ssh1.Hostname = System.Configuration.ConfigurationSettings.AppSettings[ SSHHostname ].ToString();
Ssh1.LicenseKey = System.Configuration.ConfigurationSettings.AppSettings[ WODSSHLicenseKey ].ToString();
Ssh1.Login = System.Configuration.ConfigurationSettings.AppSettings[ SSHLogin ].ToString();
Ssh1.Password = System.Configuration.ConfigurationSettings.AppSettings[ SSHPassword ].ToString();
Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto;
Ssh1.Blocking = true;
string command = cat path/fakepath/something.log ;
try
{
Ssh1.Connect();
Ssh1.WaitFor(promptString);
Ssh1.Execute(command, promptString);
if (Ssh1.DataReady > 0)
{
while (Ssh1.DataReady > 0)
{
CodeString.Append(Ssh1.Receive());
System.Threading.Thread.Sleep(60000);
}
}
Ssh1.Disconnect();
}
catch (Exception ex)
{
lbl.Text = ex.Message.ToString();
}