Hi,
I am currently using 1.0.9.6 Google Calendar .NET API. My code to update a
Single event to Recurring one results in a GDataRequest Exception. This i know
is a valid exception. No problem here.
Now when i look into the Response Stream to check what the Error Message has
come form Google Server, i am getting an exception. "Stream is not readable"
The code i am using is :
public static string GetGoogleServerError(GDataRequestException exception)
{
StringBuilder builder = new StringBuilder();
try
{
if (exception.Response != null)
{
Stream receiver = exception.Response.GetResponseStream();
if (receiver != null)
{
// Pipe the stream to ahigher level stream reader with the default encoding
// format. which is UTF8
StreamReader readStream = new StreamReader(receiver);
// Read 256 charcters at a time.
char[] buffer = new char[256];
int count = readStream.Read(buffer, 0, 256);
while (count > 0)
{
builder.Append(buffer);
count = readStream.Read(buffer, 0, 256);
}
// Release the resources of stream object.
readStream.Close();
receiver.Close();
}
}
}
catch(Exception ex)
{
// Do nothing
}
return builder.Replace("\0", "").ToString();
}
The same code was working fine with 1.0.9.4 binaries. The exception i am
getting is in the line :
StreamReader readStream = new StreamReader(receiver);
Whats wrong has been done in 1.0.9.6 or what do i need to change in the above
to get the detailed error message from Google Server in 1.0.9.6 ?
I have only used what you guys said earlier in the post :
http://code.google.com/p/google-gdata/wiki/ErrorHandling and
http://groups.google.com/group/google-calendar-help-dataapi/browse_thread/thread/3a8e3ccd118ec755/3a2d9f88a02b9fa2?lnk=gst&q=http%3A%2F%2Fcode.google.com%2Fp%2Fgoogle-gdata%2Fwiki%2FErrorHandling&rnum=1#3a2d9f88a02b9fa2
Please let me ASAP.
Thanks in advance.
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---