I have everything that works locally, but when I test Twilio on an Amazon EC2 Debian 6.0.6 server running Mono 2.10.9, I find that sending SMS messages no longer works. I believe the problem lies somewhere in the server configuration, as I use the latest Twilio (3.5.6), RestSharp (104.1) and JSON.NET (4.5.11) libraries, and I can guarantee that the variables used in the following method call is not running at run time.
var client = new Twilio.TwilioRestClient("{my account number}", "{my account token}");
var smsMessage = client.SendSmsMessage("{my account phone number}", "{my mobile phone number}", "Hello World!");
Using ntop, I saw that there are bytes that send / receive / form this reqeuest, but the result of smsMessage is still zero. The SendSMSMessage function uses the RestSharp library, in particular, the Execute RestClient function, which calls the Deserialize method and returns an IRestResponse, in which the Data field is null in this case.
I saw some evidence on the Internet that the problem might be with the deserialization process, but since I guaranteed that I was using the latest version of JSON.NET, I'm not sure what else needs to be done here.
Do you have any suggestions for solving the problem, and you suspect that this is a problem with the code or server? Also do you have any tips using Debian, how can I debug this interaction, perhaps even to get a complete byte response from outside from within the application?
source
share