I had a similar problem with what it gets.
When an exception calls GetResponse (), it is a WebException. Put it as such, and then check the response flow. Yes, the length of the content is -1, but ignore it.
catch (Exception ex)
{
WebException wex = (WebException)ex;
var s = wex.Response.GetResponseStream();
string ss = "";
int lastNum = 0;
do
{
lastNum = s.ReadByte();
ss += (char)lastNum;
} while (lastNum != -1);
s.Close();
s = null;
ErrorHasOccurred(new Exception("An error has occurred sending the notification to Urban Airship. Please see the InnerException for details. Please note that, for sending messages, the master password is required (instead of the regular password). ERROR: " + ss, ex));
}
Then just a breakpoint where I have ErrorHasOccurred and read the contents of the variable ss. He will tell you about the actual error that Urban Airship returns.
source
share