Well, an exe runs much faster than the code in the IDE does and you may experience timeouts. You would need to set the connection timeout to a larger number.