Hello,
The inner exception message describes what happened. Due to long inactivity the server closed the connection, which the client side can detect only by performing some network request. Also by performing network requests periodically (lets say every 30 seconds) using that connection the server should keep the connection alive.
Unfortunately we do not provide any KeepAlive method on Ews client at the moment.