Internal Server Error (500) using Managed Client Object Model Maybe also add context.AuthenticationMode = ClientAuthenticationMode.Default;
And it's also better if you create a custom class which extends the ClientContext so you can do the authentication in the constructor from your own custom class.