0
I'm using the below code in the Client.
public bool IsAvailableServerConnection()
{
try{
ServerConnection.Open(); //Connection with the DB in Server
return true;
}
catch{
return false;
}
}
When the connection is broken a timer is enabled, this timer has the next code:
private void tmrChecarConexion_Tick(object sender, System.EventArgs e)
{
if (!IsAvailableServerConnection()) //If connection keep broken
return;
//Update the Server
}
Troubleshoot:
If I disconnected the network cable from the Client, the timer would be enbled. and if 2 minutues later I connected the network cable, the application would work fine.
But, when the cable keep disconnected during 1 hour and up, it doesn't work (the method return false).
I don't know why.
Any one can help me?
I know is complicate to shoot, but if u have another way or another idea to do this I'd appreciate your help.
thanx in advance.