Lesson learned: Don’t return the type System.Object in your methods or functions. Use interfaces or classes and mark them Serializable. You will save all the developers that come after you some headaches.
Just ran into an issue where someone returned an object type and I needed to pass the object over WCF. It kept closing my connection unexpectedly. The fix, wrap the “object” and pass it back as a KnownType.