Thanks, i solved the issue, my error was that i was trying to serialize an object of type DataGridViewRowCollection which is not marked as a Serializable object, i made my custom class which marked as Serializable, i had stored all the data in the DataGridViewRowCollection in that class, now everything is OK thanks again,