Kulvinder,
you are of course correct, and this was a blowup on my part - that line
should never have gone in, and i need to add a unittest case to catch this
in the future.
There is going to be a new release coming up soon, for the meantime, just
sync to SVN, there are new DLLs and new sources that, I hope, fix this issue
(pretty much just removed the line). Please let me know as soon as possible
if your issues are resolved by those binaries.
My sincere apologies for this.
Frank Mantek
Google
On 5/3/07, Ryan Boyd (Google) <[EMAIL PROTECTED]> wrote:
>
>
> Thanks Kulvinder for the detailed report. We're looking into it and
> will post as we have more info..
>
> Cheers,
> -Ryan
>
>
> On May 2, 9:16 pm, "Kulvinder Singh" <[EMAIL PROTECTED]> wrote:
> > Can anybody reply to this please ?
> >
> > Its a major issue
> >
> > On 5/2/07, Kulvinder Singh <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > It seems that the problem is in line :
> > > *Tracing.TraceMsg("Exception text: " + gde.ResponseString);*
> >
> > > you guys have added this line in 1.0.9.6 and when i went to
> ResponseString
> > > property definition, it reads the value from the stream and i know
> once you
> > > have read this property you cant read that again. Thats the catch
> because
> > > stream is closed after reading it.
> >
> > > So you guys must have created a "private" "responsestring" variable
> and
> > > store the read ResponseString variable in that and check whether you
> have
> > > read the Response earlier or not. If not, read the resposne and assign
> it to
> > > this else take the value from this variable.
> >
> > > Can you please check ?
> >
> > > *Kulvinder Singh <[EMAIL PROTECTED]>* wrote:
> >
> > > I have looked at the ResponseString Property of GDataRequestException.
> In
> > > the request.cs in Google.GData.Client, the error message was "Single
> Event
> > > must not have a recurrence
> rule\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
> > > which is correct but when i try to get the same message through the
> rethrown
> > > GDataRequestException, i am getting the "stream is not readable"
> exception.
> >
> > > -- The code below is in request.cs class
> > > public virtual void Execute() {
> > > try {
> > > EnsureWebRequest();
> > > // if we ever handed out a stream, we want to close it before doing
> the
> > > real excecution
> > > if (this.requestStream != null) {
> > > this.requestStream.Close(); }
> > > Tracing.TraceCall("calling the real execution over the webresponse");
> > > this.webResponse = this.webRequest.GetResponse(); }
> > > catch (WebException e) {
> > > Tracing.TraceCall("GDataRequest::Execute failed: " +
> this.targetUri.ToString());
> >
> > > GDataRequestException gde = new GDataRequestException("Execution of
> > > request failed: " + this.targetUri.ToString(), e);
> > > *Tracing.TraceMsg("Exception text: "** + gde.ResponseString);*
> > > throw gde; }
> >
> > > Hope this helps.
> >
> > > *Kulvinder Singh <[EMAIL PROTECTED]>* wrote:
> >
> > > 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/ErrorHandlingand
> > >http://groups.google.com/group/google-calendar-help-dataapi/browse_th.
> ..
> >
> > > Please let me ASAP.
> >
> > > Thanks in advance.
> > > ------------------------------
> > > Ahhh...imagining that irresistible "new car" smell?
> > > Check out new cars at Yahoo! Autos.<
> http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.htm...>
> > > ------------------------------
> > > Ahhh...imagining that irresistible "new car" smell?
> > > Check out new cars at Yahoo! Autos.<
> http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.htm...>
> > > ------------------------------
> > > Ahhh...imagining that irresistible "new car" smell?
> > > Check out new cars at Yahoo! Autos.<
> http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.htm...>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---