Wat!

Mono Frustrations: WebRequest

The WebRequest class has many issues, especially in Mono. A major problem occurs when the response code is an HTTP error (e.g. 4xx), for which the class throws an Exception, causing a Runtime Error if it goes unhandled. This is not a big deal in .NET, because the request.GetResponse() call can be surrounded by a try/catch block that catches the thrown WebException, which still contains the response in its Response property. However, a bug in Mono makes it impossible to retrieve the response from a WebException, as the Response property is always null.

Solution: It is a better idea to use a TcpClient instead and manually generate an HTTP request using it.

Sam Afshari's Notes July 1, 2015

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.

An unhandled error has occurred. Reload 🗙