Home › Forums › Support › "Timeout occurred after 1000ms waiting for response packet of type 'Data Table'" › Reply To: "Timeout occurred after 1000ms waiting for response packet of type 'Data Table'"
Heya tomas,
Welcome to out forums and thank-you for your interest in our library. We’ll certainly help as much as we can.
1) Timeout occurred after 1000ms waiting for response packet of type 'Data Table'
– This exception is correctly thrown by the client if it does not receive the expected reply after the provided timeout.
2) If an exception occurs within a packethandler and you do not catch it yourself NetworkComms.Net should save out an error file with some useful information. This should be in the application execution directory. You mention in your second example that adding the following code prevents the object being sent:
DataTable t = sql.RetrieveAllTables(); string temp = "" t.WriteXml(temp);
My guess is that code snippet is throwing some sort of exception which prevents the SendObject method being called.
3) NetworkComms.Net will attempt to automatically serialise/deserialise the object being sent, in this case a DataTable
. If it is unable to serialise/deserialise an exception will be thrown or log file will be created by the client or server depending on where the problem occurred, see point 1 above. If DataTable
is not successfully serialised/deserialised your best solution is to create a suitable wrapper object. We wrote a tutorial regarding this issue which uses an Image
object as an example, https://networkcomms.net/custom-objects/.
Hopefully the above solves your issues, if not please feel free to post back.
Regards,
Marc