A 403 Unauthorized error is thrown when websocket is opened inside of the WebSocketChannel class (line 103).
This seems to be because a WebSocket4Net 0.10 version sends empty Origin header if the value is not provided. Also the glassfish server version for DeviceHive Java 1.3 does not support empty origin header.
The issue can be possibly fixed by updating the WebSocket4Net library to 0.11 version (the issue is fixed there), or by constructing and passing a valid originparameter to the WebSocket constructor