This code is intended to connect to a websocket server and send a text string.
When I run it inside the Visual Studio 2019 IDE, it throws a vaguely worded exception (