In reply to Steve.

It looks like you are trying to connect to a grid server -- maybe a load-balanced workspace server? This setup can be a little different and the app example I provided doesn't account for that. For example, I think there is a range of nodes/ports that might be used, instead of a single node. Right-click on a connected Workspace Server in EG and make a note of the hardware properties -- server and port.